[compiler-rt] [compiler-rt] Don't link builtins against the CRT on Windows (PR #70675)
David Truby via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 15:48:29 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 "")
----------------
DavidTruby wrote:
Empty string _is_ a valid value and stops it from inserting the default. Without this line we add /MD (to be fair, /Zl gets added after, but I think it's better to not erroneously add it)
See: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
> The value may also be the empty string ("") in which case no runtime library selection flag will be added explicitly by CMake.
https://github.com/llvm/llvm-project/pull/70675
More information about the llvm-commits
mailing list