Skip to content

Commit 2344a72

Browse files
committed
[test][sanitizer] Check LINKER_IS_LLD to detect LLD
This enables some tests requiring LLD when we test compiler-rt activated with LLVM_ENABLE_RUNTIMES.
1 parent 1ce1732 commit 2344a72

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

compiler-rt/CMakeLists.txt

+8-6
Original file line numberDiff line numberDiff line change
@@ -708,13 +708,15 @@ if(COMPILER_RT_USE_LIBCXX)
708708
endif()
709709
endif()
710710

711-
set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld)
712-
if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
713-
set(COMPILER_RT_HAS_LLD TRUE)
714-
else()
715-
set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
716-
if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
711+
if (LINKER_IS_LLD OR LLVM_TOOL_LLD_BUILD)
712+
set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld)
713+
if(EXISTS ${COMPILER_RT_LLD_PATH}/)
717714
set(COMPILER_RT_HAS_LLD TRUE)
715+
else()
716+
set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
717+
if(EXISTS ${COMPILER_RT_LLD_PATH}/)
718+
set(COMPILER_RT_HAS_LLD TRUE)
719+
endif()
718720
endif()
719721
endif()
720722

0 commit comments

Comments
 (0)