@@ -10,14 +10,35 @@ set(LLVM_EXTERNAL_PROJECTS
1010 swift
1111 CACHE STRING "" )
1212
13+ set (LLVM_ENABLE_RUNTIMES
14+ compiler-rt
15+ CACHE STRING "" )
16+
1317# NOTE(compnerd) always enable assertions, the toolchain will not provide enough
1418# context to resolve issues otherwise and may silently generate invalid output.
1519set (LLVM_ENABLE_ASSERTIONS YES CACHE BOOL "" )
1620
1721set (ENABLE_X86_RELAX_RELOCATIONS YES CACHE BOOL "" )
1822
1923set (LLVM_APPEND_VC_REV NO CACHE BOOL "" )
24+ set (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR YES CACHE BOOL "" )
2025set (LLVM_ENABLE_PYTHON YES CACHE BOOL "" )
26+ set (LLVM_RUNTIME_TARGETS
27+ x86_64-unknown-windows-msvc
28+ CACHE STRING "" )
29+ foreach (target ${LLVM_RUNTIME_TARGETS} )
30+ set (RUNTIMES_${target} _LLVM_ENABLE_RUNTIMES
31+ compiler-rt
32+ CACHE STRING "" )
33+ set (RUNTIMES_${target} _CMAKE_MT mt CACHE STRING "" )
34+ set (RUNTIMES_${target} _CMAKE_SYSTEM_NAME Windows CACHE STRING "" )
35+ set (RUNTIMES_${target} _CMAKE_BUILD_TYPE Release CACHE STRING "" )
36+ set (RUNTIMES_${target} _COMPILER_RT_BUILD_CRT NO CACHE BOOL "" )
37+ set (RUNTIMES_${target} _COMPILER_RT_BUILD_LIBFUZZER NO CACHE BOOL "" )
38+ set (RUNTIMES_${target} _COMPILER_RT_BUILD_PROFILE YES CACHE BOOL "" )
39+ set (RUNTIMES_${target} _COMPILER_RT_BUILD_SANITIZERS NO CACHE BOOL "" )
40+ set (RUNTIMES_${target} _COMPILER_RT_BUILD_XRAY NO CACHE BOOL "" )
41+ endforeach ()
2142set (LLVM_TARGETS_TO_BUILD AArch64 ARM WebAssembly X86 CACHE STRING "" )
2243
2344# Disable certain targets to reduce the configure time or to avoid configuration
@@ -129,6 +150,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS
129150 libclang
130151 libclang-headers
131152 LTO
153+ runtimes
132154 ${LLVM_TOOLCHAIN_TOOLS}
133155 ${CLANG_TOOLS}
134156 ${LLD_TOOLS}
0 commit comments