[compiler-rt] 921c548 - [compiler-rt] Fix lld dependency for sanitizers
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 22 18:08:09 PDT 2021
Author: Vitaly Buka
Date: 2021-07-22T18:02:19-07:00
New Revision: 921c548f11ea0c21be3da87ba728ce23c11bf1a8
URL: https://github.com/llvm/llvm-project/commit/921c548f11ea0c21be3da87ba728ce23c11bf1a8
DIFF: https://github.com/llvm/llvm-project/commit/921c548f11ea0c21be3da87ba728ce23c11bf1a8.diff
LOG: [compiler-rt] Fix lld dependency for sanitizers
TARGET lld is always false there.
Added:
Modified:
compiler-rt/test/asan/CMakeLists.txt
compiler-rt/test/fuzzer/CMakeLists.txt
compiler-rt/test/hwasan/CMakeLists.txt
compiler-rt/test/ubsan/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/test/asan/CMakeLists.txt b/compiler-rt/test/asan/CMakeLists.txt
index 9f53384876fbe..80d0a56003307 100644
--- a/compiler-rt/test/asan/CMakeLists.txt
+++ b/compiler-rt/test/asan/CMakeLists.txt
@@ -26,7 +26,7 @@ endmacro()
set(ASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
if(NOT COMPILER_RT_STANDALONE_BUILD)
list(APPEND ASAN_TEST_DEPS asan)
- if(NOT APPLE AND COMPILER_RT_HAS_LLD AND TARGET lld)
+ if(NOT APPLE AND COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
list(APPEND ASAN_TEST_DEPS lld)
endif()
endif()
diff --git a/compiler-rt/test/fuzzer/CMakeLists.txt b/compiler-rt/test/fuzzer/CMakeLists.txt
index c12a04b6f2702..4ab04822447f2 100644
--- a/compiler-rt/test/fuzzer/CMakeLists.txt
+++ b/compiler-rt/test/fuzzer/CMakeLists.txt
@@ -7,7 +7,7 @@ if (NOT COMPILER_RT_STANDALONE_BUILD)
if (COMPILER_RT_HAS_DFSAN)
list(APPEND LIBFUZZER_TEST_DEPS dfsan)
endif()
- if(NOT APPLE AND COMPILER_RT_HAS_LLD AND TARGET lld)
+ if(NOT APPLE AND COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
list(APPEND LIBFUZZER_TEST_DEPS lld)
endif()
endif()
diff --git a/compiler-rt/test/hwasan/CMakeLists.txt b/compiler-rt/test/hwasan/CMakeLists.txt
index b463146132dbf..34911a307003b 100644
--- a/compiler-rt/test/hwasan/CMakeLists.txt
+++ b/compiler-rt/test/hwasan/CMakeLists.txt
@@ -23,10 +23,8 @@ endforeach()
set(HWASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
if(NOT COMPILER_RT_STANDALONE_BUILD)
list(APPEND HWASAN_TEST_DEPS hwasan)
- if(COMPILER_RT_HAS_LLD)
- if (TARGET lld)
- list(APPEND HWASAN_TEST_DEPS lld)
- endif()
+ if(COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
+ list(APPEND HWASAN_TEST_DEPS lld)
endif()
endif()
diff --git a/compiler-rt/test/ubsan/CMakeLists.txt b/compiler-rt/test/ubsan/CMakeLists.txt
index f7ca0e5c04bb1..5d5f98c4ee3f2 100644
--- a/compiler-rt/test/ubsan/CMakeLists.txt
+++ b/compiler-rt/test/ubsan/CMakeLists.txt
@@ -8,7 +8,7 @@ macro(add_ubsan_testsuite test_mode sanitizer arch lld thinlto)
set(CONFIG_NAME ${UBSAN_LIT_TEST_MODE})
if (${lld})
set(CONFIG_NAME ${CONFIG_NAME}-lld)
- if (TARGET lld)
+ if ("lld" IN_LIST LLVM_ENABLE_PROJECTS)
list(APPEND UBSAN_TEST_DEPS lld)
endif()
endif()
More information about the llvm-commits
mailing list