[PATCH] D110035: [CMake] Add detection for the mold linker in AddLLVM.cmake.

Frederic Cambus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 24 05:09:19 PDT 2021


fcambus updated this revision to Diff 374808.
fcambus added a comment.

This revision drops the unneeded line setting LLVM_LINKER_IS_GOLD.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110035/new/

https://reviews.llvm.org/D110035

Files:
  llvm/cmake/modules/AddLLVM.cmake


Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -193,7 +193,10 @@
       OUTPUT_VARIABLE stdout
       ERROR_VARIABLE stderr
       )
-    if("${stdout}" MATCHES "GNU gold")
+    if("${stdout}" MATCHES "^mold")
+      set(LLVM_LINKER_DETECTED YES CACHE INTERNAL "")
+      message(STATUS "Linker detection: mold")
+    elseif("${stdout}" MATCHES "GNU gold")
       set(LLVM_LINKER_DETECTED YES CACHE INTERNAL "")
       set(LLVM_LINKER_IS_GOLD YES CACHE INTERNAL "")
       message(STATUS "Linker detection: GNU Gold")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110035.374808.patch
Type: text/x-patch
Size: 656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210924/277725ec/attachment.bin>


More information about the llvm-commits mailing list