Skip to content

Commit 76be949

Browse files
committedNov 26, 2024
Align default targets for builtins and runtimes on x86_64 hosts
1 parent 9b02439 commit 76be949

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed
 

‎cmake/caches/Windows-x86_64.cmake

+13-12
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,21 @@ set(LLVM_APPEND_VC_REV NO CACHE BOOL "")
2727
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR YES CACHE BOOL "")
2828
set(LLVM_ENABLE_PYTHON YES CACHE BOOL "")
2929

30-
set(DEFAULT_BUILTIN_TARGETS
30+
set(default_targets
3131
x86_64-unknown-windows-msvc
32-
aarch64-unknown-windows-msvc)
32+
aarch64-unknown-windows-msvc
33+
i686-unknown-windows-msvc)
3334
# Build the android builtins if NDK path is provided.
3435
if(NOT "$ENV{NDKPATH}" STREQUAL "")
35-
list(APPEND DEFAULT_BUILTIN_TARGETS
36+
list(APPEND default_targets
3637
aarch64-unknown-linux-android
37-
x86_64-unknown-linux-android)
38+
x86_64-unknown-linux-android
39+
i686-unknown-linux-android
40+
armv7-unknown-linux-androideabi)
3841
endif()
3942

40-
# The builtin targets are used to build the compiler-rt builtins.
41-
set(LLVM_BUILTIN_TARGETS ${DEFAULT_BUILTIN_TARGETS} CACHE STRING "")
42-
43-
# The runtime targets are used to build the profile and sanitizer libs from compiler-rt.
44-
set(LLVM_RUNTIME_TARGETS
45-
x86_64-unknown-windows-msvc
46-
aarch64-unknown-windows-msvc
47-
CACHE STRING "")
43+
set(LLVM_BUILTIN_TARGETS ${default_targets} CACHE STRING "")
44+
set(LLVM_RUNTIME_TARGETS ${default_targets} CACHE STRING "")
4845

4946
foreach(target ${LLVM_RUNTIME_TARGETS})
5047
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES
@@ -74,6 +71,10 @@ foreach(target ${LLVM_BUILTIN_TARGETS})
7471
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Android CACHE STRING "")
7572
if(${target} MATCHES aarch64)
7673
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI arm64-v8a CACHE STRING "")
74+
elseif(${target} MATCHES armv7)
75+
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI armeabi-v7a CACHE STRING "")
76+
elseif(${target} MATCHES i686)
77+
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI i686 CACHE STRING "")
7778
else()
7879
set(BUILTINS_${target}_CMAKE_ANDROID_ARCH_ABI x86_64 CACHE STRING "")
7980
endif()

‎utils/build.ps1

+6-2
Original file line numberDiff line numberDiff line change
@@ -2777,8 +2777,12 @@ if (-not $SkipBuild) {
27772777
Invoke-BuildStep Build-Compilers $HostArch
27782778
if ($IncludeSanitizers) {
27792779
$InstallTo = "$($HostArch.ToolchainInstallRoot)\usr"
2780-
Invoke-BuildStep Build-Sanitizers Windows $ArchX64 $InstallTo
2781-
Invoke-BuildStep Build-Sanitizers Windows $ArchARM64 $InstallTo
2780+
foreach ($Arch in $WindowsSDKArchs) {
2781+
Invoke-BuildStep Build-Sanitizers Windows $Arch $InstallTo
2782+
}
2783+
foreach ($Arch in $AndroidSDKArchs) {
2784+
Invoke-BuildStep Build-Sanitizers Windows $Arch $InstallTo
2785+
}
27822786
}
27832787
}
27842788

0 commit comments

Comments
 (0)