Skip to content

Commit e637384

Browse files
petrhosekmemfrob
authored andcommitted
[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
1 parent b5cb207 commit e637384

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/test/profile/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set(PROFILE_TESTSUITES)
55
set(PROFILE_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
66
if(NOT COMPILER_RT_STANDALONE_BUILD)
77
list(APPEND PROFILE_TEST_DEPS profile llvm-profdata llvm-cov)
8-
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND TARGET lld)
8+
if(NOT APPLE AND COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
99
list(APPEND PROFILE_TEST_DEPS lld)
1010
endif()
1111
endif()

0 commit comments

Comments
 (0)