build: re-enable mold and enable --icf=all / --icf=safe

This commit is contained in:
Marcus Holland-Moritz 2025-04-11 19:33:48 +02:00
parent 876dda3db5
commit 4ca5ae3ce8

View File

@ -151,10 +151,10 @@ esac
case "-$BUILD_TYPE-" in
*-lto-*)
CMAKE_ARGS="${CMAKE_ARGS} -DDISABLE_MOLD=1"
export CFLAGS="${CFLAGS} -flto=auto"
export CXXFLAGS="${CXXFLAGS} -flto=auto"
export LDFLAGS="${LDFLAGS} -flto=auto"
# The -L option is needed so that boost_iostreams finds the right libzstd...
export LDFLAGS="${LDFLAGS} -fuse-ld=mold -flto=auto -Wl,--icf=all -L/opt/static-libs/$COMPILER/lib"
export COMPILER="${COMPILER}-lto"
;;
esac