Skip to content

Commit a996a15

Browse files
authored
[CMake] Allow parametrizing of the static libraries in Cross ARM CMake cache. NFC. (#118737)
In order to support the cross-arm remote tests for LLDB project (see 'lldb-remote-linux-*' public builders for details).
1 parent 44be794 commit a996a15

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

clang/cmake/caches/CrossWinToARMLinux.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ endif()
9696
if (NOT DEFINED TOOLCHAIN_SHARED_LIBS)
9797
set(TOOLCHAIN_SHARED_LIBS OFF)
9898
endif()
99-
99+
# Enable usage of the static libunwind and libc++abi libraries.
100+
if (NOT DEFINED TOOLCHAIN_USE_STATIC_LIBS)
101+
set(TOOLCHAIN_USE_STATIC_LIBS ON)
102+
endif()
103+
100104
if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
101105
if ("${TOOLCHAIN_TARGET_TRIPLE}" MATCHES "^(armv|arm32)+")
102106
set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "")
@@ -206,7 +210,7 @@ set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_USE_COMPILER_RT
206210
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_ENABLE_SHARED ${TOOLCHAIN_SHARED_LIBS} CACHE BOOL "")
207211

208212
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
209-
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
213+
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_STATIC_UNWINDER ${TOOLCHAIN_USE_STATIC_LIBS} CACHE BOOL "")
210214
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
211215
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
212216
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_SHARED ${TOOLCHAIN_SHARED_LIBS} CACHE BOOL "")
@@ -217,7 +221,7 @@ set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ABI_VERSION
217221
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_CXX_ABI "libcxxabi" CACHE STRING "") #!!!
218222
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS ON CACHE BOOL "")
219223
# Merge libc++ and libc++abi libraries into the single libc++ library file.
220-
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
224+
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ${TOOLCHAIN_USE_STATIC_LIBS} CACHE BOOL "")
221225
# Forcely disable the libc++ benchmarks on Windows build hosts
222226
# (current benchmark test configuration does not support the cross builds there).
223227
if (WIN32)

0 commit comments

Comments
 (0)