[compiler-rt] Fix lld dependency for sanitizers

TARGET lld is always false there.
This commit is contained in:
Vitaly Buka 2021-07-22 17:36:32 -07:00
parent 44ba8c691c
commit 921c548f11
4 changed files with 5 additions and 7 deletions

View file

@ -26,7 +26,7 @@ endmacro()
set(ASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) set(ASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
if(NOT COMPILER_RT_STANDALONE_BUILD) if(NOT COMPILER_RT_STANDALONE_BUILD)
list(APPEND ASAN_TEST_DEPS asan) 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) list(APPEND ASAN_TEST_DEPS lld)
endif() endif()
endif() endif()

View file

@ -7,7 +7,7 @@ if (NOT COMPILER_RT_STANDALONE_BUILD)
if (COMPILER_RT_HAS_DFSAN) if (COMPILER_RT_HAS_DFSAN)
list(APPEND LIBFUZZER_TEST_DEPS dfsan) list(APPEND LIBFUZZER_TEST_DEPS dfsan)
endif() 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) list(APPEND LIBFUZZER_TEST_DEPS lld)
endif() endif()
endif() endif()

View file

@ -23,10 +23,8 @@ endforeach()
set(HWASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) set(HWASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
if(NOT COMPILER_RT_STANDALONE_BUILD) if(NOT COMPILER_RT_STANDALONE_BUILD)
list(APPEND HWASAN_TEST_DEPS hwasan) list(APPEND HWASAN_TEST_DEPS hwasan)
if(COMPILER_RT_HAS_LLD) if(COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
if (TARGET lld) list(APPEND HWASAN_TEST_DEPS lld)
list(APPEND HWASAN_TEST_DEPS lld)
endif()
endif() endif()
endif() endif()

View file

@ -8,7 +8,7 @@ macro(add_ubsan_testsuite test_mode sanitizer arch lld thinlto)
set(CONFIG_NAME ${UBSAN_LIT_TEST_MODE}) set(CONFIG_NAME ${UBSAN_LIT_TEST_MODE})
if (${lld}) if (${lld})
set(CONFIG_NAME ${CONFIG_NAME}-lld) set(CONFIG_NAME ${CONFIG_NAME}-lld)
if (TARGET lld) if ("lld" IN_LIST LLVM_ENABLE_PROJECTS)
list(APPEND UBSAN_TEST_DEPS lld) list(APPEND UBSAN_TEST_DEPS lld)
endif() endif()
endif() endif()