Explorar o código

FindBinUtils: Fall back to ld for Clang without lld

If `lld` is not available, Clang can still use `ld`.

Fixes: #22500
Thomas Bernard %!s(int64=4) %!d(string=hai) anos
pai
achega
788b7afff2
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Modules/CMakeFindBinUtils.cmake

+ 2 - 2
Modules/CMakeFindBinUtils.cmake

@@ -165,9 +165,9 @@ else()
   # Prepend toolchain-specific names.
   if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" STREQUAL Clang)
     if("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_SIMULATE_ID}" STREQUAL "xMSVC")
-      set(_CMAKE_LINKER_NAMES "lld-link")
+      list(PREPEND _CMAKE_LINKER_NAMES "lld-link")
     else()
-      set(_CMAKE_LINKER_NAMES "ld.lld")
+      list(PREPEND _CMAKE_LINKER_NAMES "ld.lld")
     endif()
     list(PREPEND _CMAKE_AR_NAMES "llvm-ar")
     list(PREPEND _CMAKE_RANLIB_NAMES "llvm-ranlib")