forked from OSchip/llvm-project
[CMake][profile] Don't use `TARGET lld` to avoid ordering issues
Depending on the order in which lld and compiler-rt projects are processed by CMake, `TARGET lld` might evaluate to `TRUE` or `FALSE` even though `lld-available` lit stanza is always set because lld is being built. We check whether lld project is enabled instead which is used by other compiler-rt tests. The ideal solution here would be to use CMake generator expressions, but those cannot be used for dependencies yet, see: https://gitlab.kitware.com/cmake/cmake/-/issues/19467 Differential Revision: https://reviews.llvm.org/D97256
This commit is contained in:
parent
67e0d58de4
commit
b6876ddc82
|
@ -5,7 +5,7 @@ set(PROFILE_TESTSUITES)
|
|||
set(PROFILE_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
||||
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
list(APPEND PROFILE_TEST_DEPS profile llvm-profdata llvm-cov)
|
||||
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 PROFILE_TEST_DEPS lld)
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue