diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -90,7 +90,8 @@ -DCMAKE_ASM_COMPILER_WORKS=ON ${COMMON_CMAKE_ARGS} ${BUILTINS_CMAKE_ARGS} - PASSTHROUGH_PREFIXES COMPILER_RT + PASSTHROUGH_PREFIXES CMAKE_OSX + COMPILER_RT USE_TOOLCHAIN TARGET_TRIPLE ${TARGET_TRIPLE} ${EXTRA_ARGS}) @@ -181,10 +182,10 @@ 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 +242,8 @@ -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}