[compiler-rt] 2344a72 - [test][sanitizer] Check LINKER_IS_LLD to detect LLD
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 11:02:13 PDT 2023
Author: Vitaly Buka
Date: 2023-09-11T11:02:01-07:00
New Revision: 2344a72dd63661098244b3bc43696710686ef9d9
URL: https://github.com/llvm/llvm-project/commit/2344a72dd63661098244b3bc43696710686ef9d9
DIFF: https://github.com/llvm/llvm-project/commit/2344a72dd63661098244b3bc43696710686ef9d9.diff
LOG: [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.
Added:
Modified:
compiler-rt/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 737ba774a17280..cc3190bd7f761e 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -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()
More information about the llvm-commits
mailing list