diff options
author | Thomas Bernard <thomas@famillebernardgouriou.fr> | 2021-08-16 21:48:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-08-18 18:31:21 (GMT) |
commit | 788b7afff20a59bada4dbb21418d9f83290996c6 (patch) | |
tree | e0da503c2e30491f05a37b0cfb94c54b26b23171 | |
parent | 3de5096094b440b75887467a79e04eaafb2ba236 (diff) | |
download | CMake-788b7afff20a59bada4dbb21418d9f83290996c6.zip CMake-788b7afff20a59bada4dbb21418d9f83290996c6.tar.gz CMake-788b7afff20a59bada4dbb21418d9f83290996c6.tar.bz2 |
FindBinUtils: Fall back to ld for Clang without lld
If `lld` is not available, Clang can still use `ld`.
Fixes: #22500
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index d0beac6..bb97f4a 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/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") |