[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
Mon Oct 30 14:51:38 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:

I don't think this line is needed - an empty string isn't one of the valid choices for `CMAKE_MSVC_RUNTIME_LIBRARY`, so I think this just uses CMake's default anyway. So if we don't need to, we should probably avoid messing around with this variable.

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


More information about the llvm-commits mailing list