Add missing lld checks in sanitizer tests.

Do not add an lld dependency when this target does not exist. In this
case the system installation of lld is used (or whatever is detected
with -fuse-ld=lld by default).
This commit is contained in:
Evgenii Stepanov 2019-10-28 10:21:01 -07:00
parent 7c86069820
commit 3f345732b4
3 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,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)
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND TARGET lld)
list(APPEND ASAN_TEST_DEPS lld)
endif()
endif()

View File

@ -86,7 +86,7 @@ if(NOT COMPILER_RT_STANDALONE_BUILD)
)
endif()
endif()
if(NOT APPLE AND COMPILER_RT_HAS_LLD)
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND TARGET lld)
list(APPEND CFI_TEST_DEPS
lld
)

View File

@ -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)
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND TARGET lld)
list(APPEND LIBFUZZER_TEST_DEPS lld)
endif()
endif()