diff options
author | Thomas Bernard <tbernard@go-engineering.de> | 2020-09-05 22:56:09 (GMT) |
---|---|---|
committer | Thomas Bernard <thomas@famillebernardgouriou.fr> | 2020-09-14 20:00:17 (GMT) |
commit | 013270ef09c681e241440747993c6b267477d926 (patch) | |
tree | 5967ec538141537bcdff7f6e7079197609ea3077 /Modules | |
parent | b8fd97735ba9e6a2be3e761d5969a04435313277 (diff) | |
download | CMake-013270ef09c681e241440747993c6b267477d926.zip CMake-013270ef09c681e241440747993c6b267477d926.tar.gz CMake-013270ef09c681e241440747993c6b267477d926.tar.bz2 |
Clang: Detect lld-link when using gnu front end with msvc target
Fixes: #21137
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 66adafa..ce8a0f7 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -94,7 +94,11 @@ else() set(_CMAKE_ADDITIONAL_AR_NAMES "llvm-ar") set(_CMAKE_ADDITIONAL_RANLIB_NAMES "llvm-ranlib") set(_CMAKE_ADDITIONAL_STRIP_NAMES "llvm-strip") - set(_CMAKE_ADDITIONAL_LINKER_NAMES "ld.lld") + if("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_SIMULATE_ID}" STREQUAL "xMSVC") + set(_CMAKE_ADDITIONAL_LINKER_NAMES "lld-link") + else() + set(_CMAKE_ADDITIONAL_LINKER_NAMES "ld.lld") + endif() set(_CMAKE_ADDITIONAL_NM_NAMES "llvm-nm") set(_CMAKE_ADDITIONAL_OBJDUMP_NAMES "llvm-objdump") set(_CMAKE_ADDITIONAL_OBJCOPY_NAMES "llvm-objcopy") |