On Thu, Dec 10, 2015 at 10:20 PM, Edward Diener <eldiener@tropicsoft.com> wrote:
On 12/10/2015 5:03 PM, Beman Dawes wrote:
See
http://blogs.msdn.com/b/vcblog/archive/2015/12/04/introducing-clang-with-microsoft-codegen-in-vs-2015-update-1.aspx

I've been testing clang/c2 both via the Visual Studio IDE and from the
command line. While it is just a preview release, it already works well
enough that having a Boost.Build toolset would be quite useful.

It would be great if someone could contribute such a toolset!

I contributed a general Windows toolset for clang-cl, which was actually taken from another user's post. The toolset is called clang-win.jam. This was never integrated into the general clang.jam because of the difficulty under Windows of distinguishing between the clang/gcc and clang-cl implementations of clang on Windows. Furthermore because I did not believe that attempting to replicate the broken VC++ preprocessor in clang-cl in all situations is a viable way of using that compiler I did not pursue that sort of integration in Boost build, even if I were capable of doing it ( which I am not because my level of understanding Boost build is pretty low ).

I'm also not knowledgeable enough to create a toolset.
 

Given the assumption that clang/c2 uses the clang preprocessor and not the broken VC++ imitation clang-cl preprocessor I would also like to see a clang/c2 implementation in Boost build to test out libraries under Windows using it. But someone else with a much greater understanding of Boost build than mine needs to step and provide it, perhaps using what is already in clang-win.jam.

Clang/c2 almost certainly uses the regular clang preprocessor. But if you already have Visual Studio 2015 installed, It only takes a few minutes to try it yourself. Presumably you might want to use the -fno-ms-compatibility options. There is also an option to turn microsoft extensions on/off.
 

While clang/gcc on Windows is a very strong and relibale compiler, its linker is still broken in numerous situations where the Windows gcc linker is working properly. I just haven't had the time to present those situations to clang on their developers mailing list. Therefore if clang/c2 on Windows works better overall it would be great.

Clang/c2 uses the Microsoft code generator and linker. And they are pushing clang changes back to clang itself, as well as making changes to the Microsoft code generator and standard library as needed.

--Beman