Skip to content

Commit

Permalink
[test][sanitizer] Check LINKER_IS_LLD to detect LLD
Browse files Browse the repository at this point in the history
This enables some tests requiring LLD when we test
compiler-rt activated with LLVM_ENABLE_RUNTIMES.
  • Loading branch information
vitalybuka authored and ZijunZhaoCCK committed Sep 19, 2023
1 parent 4585892 commit ecdaeaa
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions compiler-rt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -708,13 +708,15 @@ if(COMPILER_RT_USE_LIBCXX)
endif()
endif()

set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld)
if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
set(COMPILER_RT_HAS_LLD TRUE)
else()
set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
if (LINKER_IS_LLD OR LLVM_TOOL_LLD_BUILD)
set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld)
if(EXISTS ${COMPILER_RT_LLD_PATH}/)
set(COMPILER_RT_HAS_LLD TRUE)
else()
set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
if(EXISTS ${COMPILER_RT_LLD_PATH}/)
set(COMPILER_RT_HAS_LLD TRUE)
endif()
endif()
endif()

Expand Down

0 comments on commit ecdaeaa

Please sign in to comment.