Skip to content

Commit 0a8da95

Browse files
committed
caches: add LLVM_DEFAULT_TARGET_TRIPLE to Windows-x86_64
Add the default target triple to match the target for the Windows toolchain. This avoids the need for an additional parameter, and it makes sense for the target to be the host by default. Explicit parameters can change the target when desired.
1 parent f460de4 commit 0a8da95

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/caches/Windows-x86_64.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ set(LLVM_ENABLE_ASSERTIONS YES CACHE BOOL "")
2020

2121
set(ENABLE_X86_RELAX_RELOCATIONS YES CACHE BOOL "")
2222

23+
# NOTE(compnerd) we can hardcode the default target triple since the cache files
24+
# are target dependent.
25+
set(LLVM_DEFAULT_TARGET_TRIPLE x86_64-unknown-windows-msvc CACHE STRING "")
26+
2327
set(LLVM_APPEND_VC_REV NO CACHE BOOL "")
2428
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR YES CACHE BOOL "")
2529
set(LLVM_ENABLE_PYTHON YES CACHE BOOL "")
@@ -39,6 +43,7 @@ foreach(target ${LLVM_RUNTIME_TARGETS})
3943
set(RUNTIMES_${target}_COMPILER_RT_BUILD_SANITIZERS NO CACHE BOOL "")
4044
set(RUNTIMES_${target}_COMPILER_RT_BUILD_XRAY NO CACHE BOOL "")
4145
endforeach()
46+
4247
set(LLVM_TARGETS_TO_BUILD AArch64 ARM WebAssembly X86 CACHE STRING "")
4348

4449
# Disable certain targets to reduce the configure time or to avoid configuration

0 commit comments

Comments
 (0)