You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/clang-support-cmake.md
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -21,21 +21,23 @@ You can use Visual Studio with Clang to edit and debug C++ CMake projects that t
21
21
**Linux**: For Linux CMake projects, no special Visual Studio support is required. You can install Clang using your distro's package manager, and add the appropriate commands in the CMakeLists.txt file.
22
22
23
23
## Install
24
-
25
24
::: moniker-end
26
25
::: moniker range="msvc-160"
27
26
28
27
For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. When using a custom Clang installation, check the **C++ Clang-cl for v142 build tools** component.
29
28
29
+

30
+
30
31
::: moniker-end
31
32
::: moniker range="msvc-170"
32
33
33
-
For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. When using a custom Clang installation, check the **C++ Clang-cl for v143 build tools** component.
34
+
For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. When using a custom Clang installation, check the **MSBuild support for LLVM (clang-cl) toolset** component.
35
+
36
+

34
37
35
38
::: moniker-end
36
39
::: moniker range=">=msvc-160"
37
40
38
-

39
41
40
42
## Create a new configuration
41
43
@@ -82,9 +84,9 @@ You can modify these values in **CMake Settings** under **CMake variables and ca
82
84
83
85
## Edit, build, and debug
84
86
85
-
After you have set up a Clang configuration, you can build and debug the project. Visual Studio detects that you are using the Clang compiler and provides IntelliSense, highlighting, navigation, and other editing features. Errors and warnings are displayed in the **Output Window**.
87
+
After you have set up a Clang configuration, you can build and debug the project. Visual Studio detects that you're using the Clang compiler and provides IntelliSense, highlighting, navigation, and other editing features. Errors and warnings are displayed in the **Output Window**.
86
88
87
-
When debugging, you can use breakpoints, memory and data visualization, and most other debugging features. Some compiler-dependent features such as Edit and Continue are not available for Clang configurations.
89
+
When debugging, you can use breakpoints, memory and data visualization, and most other debugging features. Some compiler-dependent features such as Edit and Continue aren't available for Clang configurations.
88
90
89
91

Copy file name to clipboardExpand all lines: docs/build/clang-support-msbuild.md
+19-3Lines changed: 19 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,19 +12,35 @@ helpviewer_keywords: ["Clang support for C++ MSBuild projects"]
12
12
Clang/LLVM support for both CMake and MSBuild projects is available in Visual Studio 2019 and Visual Studio 2022.
13
13
14
14
::: moniker-end
15
-
16
15
::: moniker range=">=msvc-160"
17
16
18
17
You can use Visual Studio 2019 version 16.2 and later with Clang/LLVM to edit, build, and debug C++ Visual Studio projects (MSBuild) that target Windows or Linux.
19
18
19
+
::: moniker-end
20
+
21
+
::: moniker range="=msvc-160"
22
+
## Install
23
+
24
+
For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have the tools, you can install them by opening the Visual Studio Installer and choosing **C++ Clang tools for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose **C++ Clang-cl for v142 build tools** or **C++ Clang-cl for v143 build tools**.
25
+
::: moniker-end
26
+
::: moniker range=">=msvc-170"
20
27
## Install
21
28
22
-
For best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have the tools, you can install them by opening the Visual Studio Installer and choosing **C++ Clang tools for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose **C++ Clang-cl for v142 build tools** or **C++ Clang-cl for v143 build tools**.
29
+
For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have the tools, you can install them by opening the Visual Studio Installer and choosing **C++ Clang tools for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose **MSBuild support for LLVM (clang-cl) toolset**.
30
+
::: moniker-end
23
31
32
+
::: moniker range=">=msvc-160"
24
33
The Microsoft C++ Standard Library requires at least Clang 8.0.0.
34
+
::: moniker-end
25
35
36
+
::: moniker range="=msvc-160"
26
37

38
+
::: moniker-end
39
+
::: moniker range=">=msvc-170"
40
+

41
+
::: moniker-end
27
42
43
+
::: moniker range=">=msvc-160"
28
44
Later versions of Visual Studio provide newer versions of the Clang toolset. The bundled version of Clang gets updated automatically to stay current with updates in the Microsoft implementation of the Standard Library. For example, Visual Studio 2019 version 16.11 includes Clang v12.
29
45
30
46
## Configure a Windows project to use Clang tools
@@ -83,7 +99,7 @@ The **LLVM Toolset Version** property only appears when the LLVM platform toolse
83
99
84
100
When you add a *Directory.build.props* file to a project or solution, the settings appear as the default in the project Property Pages dialog. However, changes to these properties in Visual Studio override the settings in the *Directory.build.props* file.
85
101
86
-
## Set additional properties, edit, build, and debug
102
+
## Set properties, edit, build, and debug
87
103
88
104
After you have set up a Clang configuration, right-click again on the project node and choose **Reload project**. You can now build and debug the project using the Clang tools. Visual Studio detects that you're using the Clang compiler and provides IntelliSense, highlighting, navigation, and other editing features. Errors and warnings are displayed in the **Output Window**. The project property pages for a Clang configuration are similar to the ones for MSVC. However, some compiler-dependent features such as Edit and Continue aren't available for Clang configurations. You can set a Clang compiler or linker option that isn't available in the property pages. Add it manually in the property pages under **Configuration Properties** > **C/C++ (or Linker)** > **Command Line** > **Additional Options**.
0 commit comments