summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-03-14 15:44:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-03-14 15:45:13 (GMT)
commit8f0801caccd768860768ffd358288cdb75a0654f (patch)
tree4223a02c55e8be1181a527cb9a74bac412406c79 /Modules
parentd93a7c18d86af65076e092c6879991e6b29ae4be (diff)
parent801ae06952fc090d07c666b1e56573cae648f599 (diff)
downloadCMake-8f0801caccd768860768ffd358288cdb75a0654f.zip
CMake-8f0801caccd768860768ffd358288cdb75a0654f.tar.gz
CMake-8f0801caccd768860768ffd358288cdb75a0654f.tar.bz2
Merge topic 'LINKER_TYPE-mold-support' into release-3.29
801ae06952 LINKER_TYPE: Support MOLD only on GCC versions that support it 939ac5287e LINKER_TYPE: fix spelling error in message 922883782b LINKER_TYPE: Document that linker tool should be in the PATH Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9334
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Linux-GNU.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/Platform/Linux-GNU.cmake b/Modules/Platform/Linux-GNU.cmake
index c3878eb..24bf1bb 100644
--- a/Modules/Platform/Linux-GNU.cmake
+++ b/Modules/Platform/Linux-GNU.cmake
@@ -20,5 +20,8 @@ macro(__linux_compiler_gnu lang)
set(CMAKE_${lang}_USING_LINKER_LLD "-fuse-ld=lld")
set(CMAKE_${lang}_USING_LINKER_BFD "-fuse-ld=bfd")
set(CMAKE_${lang}_USING_LINKER_GOLD "-fuse-ld=gold")
- set(CMAKE_${lang}_USING_LINKER_MOLD "-fuse-ld=mold")
+ if(NOT CMAKE_${lang}_COMPILER_ID STREQUAL "GNU"
+ OR CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL "12.1")
+ set(CMAKE_${lang}_USING_LINKER_MOLD "-fuse-ld=mold")
+ endif()
endmacro()