diff options
author | Petr Hosek <phosek@google.com> | 2022-01-10 14:51:37 -0800 |
---|---|---|
committer | Petr Hosek <phosek@google.com> | 2022-01-21 16:54:22 -0800 |
commit | 9cddfe3085c4c500e64350b56c37ae2ed1cbe3f6 (patch) | |
tree | 47475fac08bc70e0470f7354abc4ed5d0cfe576f /llvm/runtimes | |
parent | 4f547ee8b8a7d3e298c6cd95e58dd8916883e2d5 (diff) | |
download | llvm-9cddfe3085c4c500e64350b56c37ae2ed1cbe3f6.zip llvm-9cddfe3085c4c500e64350b56c37ae2ed1cbe3f6.tar.gz llvm-9cddfe3085c4c500e64350b56c37ae2ed1cbe3f6.tar.bz2 |
[CMake] Passthrough OSX CMake options to builtins and runtimes
When using the default target, there's no other way to pass these
into the builtins and runtimes subbuilds.
Differential Revision: https://reviews.llvm.org/D116976
Diffstat (limited to 'llvm/runtimes')
-rw-r--r-- | llvm/runtimes/CMakeLists.txt | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index ba78f46..05567b5 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -90,7 +90,10 @@ function(builtin_default_target compiler_rt_path) -DCMAKE_ASM_COMPILER_WORKS=ON ${COMMON_CMAKE_ARGS} ${BUILTINS_CMAKE_ARGS} - PASSTHROUGH_PREFIXES COMPILER_RT + PASSTHROUGH_PREFIXES CMAKE_OSX + COMPILER_RT + DARWIN + SANITIZER USE_TOOLCHAIN TARGET_TRIPLE ${TARGET_TRIPLE} ${EXTRA_ARGS}) @@ -181,10 +184,10 @@ foreach(entry ${runtimes}) if (${canon_name} STREQUAL "OPENMP") list(APPEND prefixes "LIBOMP" "LIBOMPTARGET") endif() - # Many compiler-rt options start with SANITIZER_ rather than COMPILER_RT_, - # so when compiler-rt is enabled, consider both. + # Many compiler-rt options start with SANITIZER_ and DARWIN_ rather than + # COMPILER_RT_, so when compiler-rt is enabled, consider both. if(canon_name STREQUAL "COMPILER_RT") - list(APPEND prefixes SANITIZER) + list(APPEND prefixes SANITIZER DARWIN) endif() string(FIND ${projName} "lib" LIB_IDX) @@ -241,7 +244,8 @@ function(runtime_default_target) -DCMAKE_ASM_COMPILER_WORKS=ON ${COMMON_CMAKE_ARGS} ${RUNTIMES_CMAKE_ARGS} - PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES + PASSTHROUGH_PREFIXES CMAKE_OSX + LLVM_ENABLE_RUNTIMES LLVM_USE_LINKER ${ARG_PREFIXES} EXTRA_TARGETS ${extra_targets} |