[compiler-rt] [compiler-rt] Don't link builtins against the CRT on Windows (PR #70675)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 00:26:53 PDT 2023


================
@@ -761,6 +761,12 @@ else ()
 
   append_list_if(COMPILER_RT_HAS_STD_C11_FLAG -std=c11 BUILTIN_CFLAGS)
 
+  # Don't link the the CRT on Windows
+  if (MSVC)
+    set(CMAKE_MSVC_RUNTIME_LIBRARY "")
----------------
mstorsjo wrote:

Oh, indeed - I did try to read the manual for this setting but I was apparently reading too sloppily. Then this makes sense I guess.

Technically, omitting all the `/MT` or `/MD` options should have the same effect as specifying `/MT`, but I guess it makes looks less conflicting at least.

https://github.com/llvm/llvm-project/pull/70675


More information about the llvm-commits mailing list