[PATCH] D144660: [compiler-rt][CMake] Properly set COMPILER_RT_HAS_LLD
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 11:04:37 PDT 2023
aeubanks updated this revision to Diff 520445.
aeubanks edited the summary of this revision.
aeubanks added a comment.
also check if we're using lld
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144660/new/
https://reviews.llvm.org/D144660
Files:
compiler-rt/CMakeLists.txt
llvm/runtimes/CMakeLists.txt
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -226,6 +226,10 @@
set_enable_per_target_runtime_dir()
+ if ("lld" IN_LIST LLVM_ENABLE_PROJECTS)
+ list(APPEND extra_args -DCOMPILER_RT_HAS_TRUNK_LLD=TRUE)
+ endif()
+
llvm_ExternalProject_Add(runtimes
${CMAKE_CURRENT_SOURCE_DIR}/../../runtimes
DEPENDS ${ARG_DEPENDS}
@@ -242,6 +246,7 @@
${COMMON_CMAKE_ARGS}
${RUNTIMES_CMAKE_ARGS}
${ARG_CMAKE_ARGS}
+ ${extra_args}
PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES
LLVM_USE_LINKER
${ARG_PREFIXES}
@@ -334,6 +339,10 @@
set_enable_per_target_runtime_dir()
+ if ("lld" IN_LIST LLVM_ENABLE_PROJECTS)
+ list(APPEND ${name}_extra_args -DCOMPILER_RT_HAS_TRUNK_LLD=TRUE)
+ endif()
+
llvm_ExternalProject_Add(runtimes-${name}
${CMAKE_CURRENT_SOURCE_DIR}/../../runtimes
DEPENDS ${ARG_DEPENDS}
Index: compiler-rt/CMakeLists.txt
===================================================================
--- compiler-rt/CMakeLists.txt
+++ compiler-rt/CMakeLists.txt
@@ -743,14 +743,8 @@
endif()
endif()
-set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld)
-if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
+if(COMPILER_RT_HAS_TRUNK_LLD AND LLVM_USE_LINKER STREQUAL "lld")
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)
- set(COMPILER_RT_HAS_LLD TRUE)
- endif()
endif()
if(ANDROID)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144660.520445.patch
Type: text/x-patch
Size: 1943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230508/a345350f/attachment.bin>
More information about the llvm-commits
mailing list