From: Daniel Arndt Date: Sat, 22 Apr 2023 13:44:53 +0000 (-0400) Subject: Also test for -fuse-ld=mold X-Git-Tag: v9.5.0-rc1~275^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=643f76975f10230340c2c8bd59890830e5a7cc2b;p=dealii.git Also test for -fuse-ld=mold --- diff --git a/cmake/setup_finalize.cmake b/cmake/setup_finalize.cmake index dea53bff14..0c0add51c7 100644 --- a/cmake/setup_finalize.cmake +++ b/cmake/setup_finalize.cmake @@ -87,6 +87,20 @@ foreach(build ${DEAL_II_BUILD_TYPES}) _check_linker_flags() + if(NOT DEAL_II_HAVE_USABLE_FLAGS_${build} AND DEAL_II_COMPILER_HAS_FUSE_LD_MOLD) + set(_replacement "") + if(DEAL_II_COMPILER_HAS_FUSE_LD_LLD) + set(_replacement "-fuse-ld=lld") + elseif(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD) + set(_replacement "-fuse-ld=gold") + endif() + _drop_linker_flag( + "-fuse-ld=mold" ${_replacement} + DEAL_II_COMPILER_HAS_FUSE_LD_MOLD + ) + _check_linker_flags() + endif() + if(NOT DEAL_II_HAVE_USABLE_FLAGS_${build} AND DEAL_II_COMPILER_HAS_FUSE_LD_LLD) set(_replacement "") if(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)