Skip to content

Commit 250d7be

Browse files
committed
doc: Recommend clang-cl when building on Windows
Clang-cl can yield noticeably better benchmark results compared to MSVC.
1 parent 201b2b8 commit 250d7be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,13 @@ To cross compile for Android with [NDK](https://developer.android.com/ndk/guides
137137
138138
To build on Windows with Visual Studio, a proper [generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#visual-studio-generators) must be specified for a new build tree.
139139
140+
Using clang-cl is recommended, as it tends to produce better-performing binaries compared to MSVC.
141+
140142
The following example assumes using of Visual Studio 2022 and CMake v3.21+.
141143
142144
In "Developer Command Prompt for VS 2022":
143145
144-
>cmake -G "Visual Studio 17 2022" -A x64 -B build
146+
>cmake -B build -T ClangCL
145147
>cmake --build build --config RelWithDebInfo
146148
147149
Usage examples

0 commit comments

Comments
 (0)