


Select “Manage Configurations” from the configuration drop down on the left of the play button. To use Clang instead, add a configuration and select one of the Clang presets. On Linux, it will use the distribution’s default compiler, often GCC. Visual Studio will use the MSVC compiler by default on Windows. Once you have installed Clang, using it with CMake projects is easy. Getting Started with Clang/LLVM in Visual Studio If ‘which clang’ finds the compiler you are good to go. To use Clang/LLVM on a remote Linux machine with Visual Studio, just install it with your distribution’s package manager. Check out “Using a Custom Version of Clang” below for more information. Older versions may have some limitations. We do recommend that you use the most recent version of Clang to get the best support in the IDE. If you have already installed Clang/LLVM you don’t need to install the compiler again with the Visual Studio installer. You can also install your own copy of Clang/LLVM or even build it from source. This will install everything you need to develop with Clang on Windows. Just grab the “Clang compiler for Windows,” an optional component of the “Desktop development with C++” workload. On Windows, it’s easy to install the Clang tools. You will also need the actual compiler and tools to build your projects. The “Desktop development with C++” workload with the Visual Studio installer now includes full support for targeting Clang/LLVM based toolsets. Installing Clang/LLVM for use with Visual Studio

Please try out the preview and let us know what is working well and what isn’t. If you are developing on Windows and targeting Clang, we hope to make Visual Studio the best IDE for that job. If you are not familiar with Visual Studio’s CMake, support check out how to get started. If you use MSBuild projects, however, don’t worry. Visual Studio 2019 includes out of the box support for editing, building, and debugging CMake projects with Clang/LLVM. The latest preview brings Clang into the fold. Visual Studio has had great tooling for MSVC and GCC for quite a while now. Visual Studio 2019 version 16.1 Preview 2 comes with support for Clang/LLVM out-of-the-box. For up-to-date documentation see Clang/LLVM support in Visual Studio projects.įor an overview of the Visual Studio capabilities described in this article, see Develop C and C++ applications.
