[PATCH] D144660: [compiler-rt][CMake] Properly set COMPILER_RT_HAS_LLD

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 23:56:54 PDT 2023


aeubanks updated this revision to Diff 519750.
aeubanks edited the summary of this revision.
aeubanks added a comment.
Herald added subscribers: llvm-commits, ekilmer.
Herald added a project: LLVM.

update


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 ARG_CMAKE_ARGS -DCOMPILER_RT_HAS_LLD=TRUE)
+  endif()
+
   llvm_ExternalProject_Add(runtimes
                            ${CMAKE_CURRENT_SOURCE_DIR}/../../runtimes
                            DEPENDS ${ARG_DEPENDS}
@@ -334,6 +338,10 @@
 
   set_enable_per_target_runtime_dir()
 
+  if ("lld" IN_LIST LLVM_ENABLE_PROJECTS)
+    list(APPEND ARG_CMAKE_ARGS -DCOMPILER_RT_HAS_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,16 +743,6 @@
   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)
-    set(COMPILER_RT_HAS_LLD TRUE)
-  endif()
-endif()
-
 if(ANDROID)
   set(COMPILER_RT_HAS_LLD TRUE)
   set(COMPILER_RT_TEST_USE_LLD TRUE)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144660.519750.patch
Type: text/x-patch
Size: 1484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230505/9f840327/attachment.bin>


More information about the llvm-commits mailing list