Skip to content

Commit 962bca8

Browse files
author
git apple-llvm automerger
committed
Merge commit 'a1817996fa86' from llvm.org/master into apple/master
2 parents b4675ce + a181799 commit 962bca8

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

compiler-rt/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ else()
497497
if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
498498
set(COMPILER_RT_HAS_LLD TRUE)
499499
else()
500-
set(COMPILER_RT_HAS_LLD FALSE)
500+
set(COMPILER_RT_HAS_LLD ${COMPILER_RT_HAS_FUSE_LD_LLD_FLAG})
501501
endif()
502502
endif()
503503
pythonize_bool(COMPILER_RT_HAS_LLD)

compiler-rt/cmake/config-ix.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
146146

147147
# Linker flags.
148148
check_linker_flag("-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT)
149+
check_linker_flag("-fuse-ld=lld" COMPILER_RT_HAS_FUSE_LD_LLD_FLAG)
149150

150151
if(ANDROID)
151152
check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)

compiler-rt/test/hwasan/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ set(HWASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
2424
if(NOT COMPILER_RT_STANDALONE_BUILD)
2525
list(APPEND HWASAN_TEST_DEPS hwasan)
2626
if(COMPILER_RT_HAS_LLD)
27-
list(APPEND HWASAN_TEST_DEPS lld)
27+
if (TARGET lld)
28+
list(APPEND HWASAN_TEST_DEPS lld)
29+
endif()
2830
endif()
2931
endif()
3032

compiler-rt/test/msan/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ macro(add_msan_testsuite arch lld thinlto)
2020
endif()
2121
if (${lld})
2222
set(CONFIG_NAME "lld-${CONFIG_NAME}")
23-
list(APPEND MSAN_TEST_DEPS lld)
23+
if (TARGET lld)
24+
list(APPEND MSAN_TEST_DEPS lld)
25+
endif()
2426
endif()
2527
set(MSAN_TEST_USE_THINLTO ${thinlto})
2628
set(MSAN_TEST_USE_LLD ${lld})

compiler-rt/test/ubsan/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ macro(add_ubsan_testsuite test_mode sanitizer arch lld thinlto)
88
set(CONFIG_NAME ${UBSAN_LIT_TEST_MODE})
99
if (${lld})
1010
set(CONFIG_NAME ${CONFIG_NAME}-lld)
11-
list(APPEND UBSAN_TEST_DEPS lld)
11+
if (TARGET lld)
12+
list(APPEND UBSAN_TEST_DEPS lld)
13+
endif()
1214
endif()
1315
if (${thinlto})
1416
set(CONFIG_NAME ${CONFIG_NAME}-thinlto)

0 commit comments

Comments
 (0)