Skip to content

Commit 921c548

Browse files
committed
[compiler-rt] Fix lld dependency for sanitizers
TARGET lld is always false there.
1 parent 44ba8c6 commit 921c548

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

compiler-rt/test/asan/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ endmacro()
2626
set(ASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
2727
if(NOT COMPILER_RT_STANDALONE_BUILD)
2828
list(APPEND ASAN_TEST_DEPS asan)
29-
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND TARGET lld)
29+
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
3030
list(APPEND ASAN_TEST_DEPS lld)
3131
endif()
3232
endif()

compiler-rt/test/fuzzer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (NOT COMPILER_RT_STANDALONE_BUILD)
77
if (COMPILER_RT_HAS_DFSAN)
88
list(APPEND LIBFUZZER_TEST_DEPS dfsan)
99
endif()
10-
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND TARGET lld)
10+
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
1111
list(APPEND LIBFUZZER_TEST_DEPS lld)
1212
endif()
1313
endif()

compiler-rt/test/hwasan/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ endforeach()
2323
set(HWASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
2424
if(NOT COMPILER_RT_STANDALONE_BUILD)
2525
list(APPEND HWASAN_TEST_DEPS hwasan)
26-
if(COMPILER_RT_HAS_LLD)
27-
if (TARGET lld)
28-
list(APPEND HWASAN_TEST_DEPS lld)
29-
endif()
26+
if(COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
27+
list(APPEND HWASAN_TEST_DEPS lld)
3028
endif()
3129
endif()
3230

compiler-rt/test/ubsan/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ 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-
if (TARGET lld)
11+
if ("lld" IN_LIST LLVM_ENABLE_PROJECTS)
1212
list(APPEND UBSAN_TEST_DEPS lld)
1313
endif()
1414
endif()

0 commit comments

Comments
 (0)