Skip to content

Commit 13b42ec

Browse files
compnerdshahmishal
authored andcommitted
build: explicitly use MSVC's manifest tool on Windows
Explicitly opt into the Microsoft manifest tool to be resilient against future CMake releases which prefer `llvm-mt` when building with clang (including clang-cl). This should ensure that we do not get broken with the update to VS2019 16.10 and CMake 3.20. (cherry picked from commit 3274984)
1 parent 16994d1 commit 13b42ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utils/build-windows.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ cmake^
180180
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%^
181181
-DCMAKE_C_COMPILER=cl^
182182
-DCMAKE_CXX_COMPILER=cl^
183+
-DCMAKE_MT=mt^
183184
-DCMAKE_INSTALL_PREFIX:PATH=%install_directory%^
184185
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-windows-msvc^
185186
-DLLVM_ENABLE_PDB:BOOL=YES^
@@ -222,6 +223,7 @@ cmake^
222223
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%^
223224
-DCMAKE_C_COMPILER=cl^
224225
-DCMAKE_CXX_COMPILER=cl^
226+
-DCMAKE_MT=mt^
225227
-DCMAKE_CXX_FLAGS:STRING="/GS- /Oy"^
226228
-DCMAKE_EXE_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
227229
-DCMAKE_SHARED_LINKER_FLAGS:STRING=/INCREMENTAL:NO^
@@ -245,6 +247,7 @@ cmake^
245247
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%^
246248
-DCMAKE_C_COMPILER=cl^
247249
-DCMAKE_CXX_COMPILER=cl^
250+
-DCMAKE_MT=mt^
248251
-DCMAKE_INSTALL_PREFIX:PATH=%install_directory%^
249252
-DClang_DIR:PATH=%build_root%\llvm\lib\cmake\clang^
250253
-DSWIFT_PATH_TO_CMARK_BUILD:PATH=%build_root%\cmark^
@@ -301,6 +304,7 @@ cmake^
301304
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%^
302305
-DCMAKE_C_COMPILER=cl^
303306
-DCMAKE_CXX_COMPILER=cl^
307+
-DCMAKE_MT=mt^
304308
-DCMAKE_INSTALL_PREFIX:PATH=%install_directory%^
305309
-DLLVM_DIR:PATH=%build_root%\llvm\lib\cmake\llvm^
306310
-DClang_DIR:PATH=%build_root%\llvm\lib\cmake\clang^
@@ -333,6 +337,7 @@ cmake^
333337
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%^
334338
-DCMAKE_C_COMPILER=clang-cl^
335339
-DCMAKE_CXX_COMPILER=clang-cl^
340+
-DCMAKE_MT=mt^
336341
-DCMAKE_Swift_COMPILER=swiftc^
337342
-DSwift_DIR:PATH=%build_root%\swift\lib\cmake\swift^
338343
-DCMAKE_INSTALL_PREFIX:PATH=%install_directory%^

0 commit comments

Comments
 (0)