locked
How come Clang is not available as a toolset? RRS feed

  • Question

  • I had VS2019 Community Edition installed, and I wanted to try out how that Clang backend performs in some cases so I decided to install the preview version alongside.

    Clang isn't present in the list

    I think I selected all of the necessary components, but Clang doesn't show up as a selectable toolset. Am I missing something?

    Installed components



    • Edited by Aphanic Sunday, May 5, 2019 7:13 PM Fixing the title, it's not Clang C2 but the whole LLVM.
    Saturday, May 4, 2019 8:48 PM

All replies

  • That isn't Clang (C2), that was removed from Visual Studio 2019 for various reasons. This is the full LLVM/Clang toolset.

    To get this to work, you need the LLVM Compiler Toolchain extension. It is easy enough to install.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    • Marked as answer by Aphanic Saturday, May 4, 2019 10:55 PM
    • Unmarked as answer by Aphanic Saturday, May 4, 2019 11:05 PM
    Saturday, May 4, 2019 9:13 PM
  • I see! I thought Clang would be an option for toolset by selecting it in the 16.1 preview installer, the description for the item is "Local install of Clang compiler for Windows" as of the 2nd preview. Maybe it'll change in a subsequent release?

    For now, installing the extension you mentioned and the whole LLVM manually seemed not to work. I still can't choose anything other than 2019 toolset, or the 2017 one I have installed too for the regular version of VS2019.

    Saturday, May 4, 2019 11:12 PM
  • That is strange.

    In VS2019 I get llvm showing up just by installing the extension and installing LLVM.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    Sunday, May 5, 2019 2:30 AM
  • Oh... Strange indeed.

    I ended up removing all instances of Visual Studio I had installed, and installing only the preview one. Just in case, selected all of the options for a C++ and C# workspace. Then LLVM 8.0 using the pre-built binaries available at their site and then the extension. It all installed correctly as per their logs, but I'm still only able to see the various Visual Studio toolsets.

    I think I'm going to revert back to the non-preview version of VS. If it works there, great, but if it doesn't since it was just to do some tests no harm done.

    Thanks for the help by the way!

    Sunday, May 5, 2019 7:13 PM
  • Hi,

    Thank you for posting here.

    >>How come Clang is not available as a toolset? 

    Visual Studio 2019 version 16.1 Preview 2 comes with support for Clang/LLVM out-of-the-box. Visual Studio has had great tooling for MSVC and GCC for quite a while now. The latest preview brings Clang into the fold.

    On Windows, it’s easy to install the Clang tools. Just grab the “Clang compiler for Windows,” an optional component of the “Desktop development with C++” workload. This will install everything you need to develop with Clang on Windows. You can also install your own copy of Clang/LLVM or even build it from source. If you have already installed Clang/LLVM you don’t need to install the compiler again with the Visual Studio installer. We do recommend that you use the most recent version of Clang to get the best support in the IDE. Older versions may have some limitations. 

    For more details, I suggest you could refer to the link:https://devblogs.microsoft.com/cppblog/clang-llvm-support-in-visual-studio/

    Best Regards,

    Jeanine Zhang


    Monday, May 6, 2019 2:04 AM
  • Hi,

    Have you got any updates? If your case has been solved, please help to mark answers. If not, just feel free to contact us.

    Your understanding and cooperation will be grateful.

    Best Regards,

    Jeanine Zhang

    Wednesday, May 15, 2019 5:26 AM