1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

mold linker: support discovery of --dependency-file support

This commit is contained in:
John Drouhard
2025-09-03 17:05:19 -05:00
parent 00185a62cf
commit 3a7eed6a27

View File

@@ -35,7 +35,7 @@ function(__linker_gnu lang)
if (NOT DEFINED CMAKE_${lang}_LINKER_DEPFILE_SUPPORTED)
## check if this feature is supported by the linker
if (CMAKE_${lang}_COMPILER_LINKER AND CMAKE_${lang}_COMPILER_LINKER_ID MATCHES "GNU|LLD")
if (CMAKE_${lang}_COMPILER_LINKER AND CMAKE_${lang}_COMPILER_LINKER_ID MATCHES "GNU|LLD|MOLD")
execute_process(COMMAND "${CMAKE_${lang}_COMPILER_LINKER}" --help
OUTPUT_VARIABLE _linker_capabilities
ERROR_VARIABLE _linker_capabilities)