How to use Clang compiler with MSBuild?

后端 未结 2 833
花落未央
花落未央 2020-12-06 12:22

I\'m trying to take a couple of projects normally compiled on Windows with Microsoft C++ and compile them with clang instead.

On the upside, there exists clang-cl.ex

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-06 12:22

    Since Visual Studio 2019 16.2, Microsoft provide an integration of MSbuild and ClangCl. So this can be achieved by:

    • Installing the “C++ Clang Tools for Windows” component
    • Choosing the "LLVM (clang-cl)” toolset in the IDE

    Microsoft's blog post has more information on this: https://devblogs.microsoft.com/cppblog/clang-llvm-support-for-msbuild-projects/

提交回复
热议问题