Skip to content

Commit f2b5b0a

Browse files
committed
build: add linker optimization flags to guix
Any -O argument will enable optimizations in GNU ld. We can use -O2 here, as this matches our compile flags. Note that this would also enable additional optimizations if using the lld or gold linkers, when compared to -O0.
1 parent b8b050a commit f2b5b0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/guix/libexec/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ HOST_CXXFLAGS="$HOST_CFLAGS"
177177

178178
# LDFLAGS
179179
case "$HOST" in
180-
*linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++" ;;
180+
*linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++ -Wl,-O2" ;;
181181
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
182182
esac
183183

0 commit comments

Comments
 (0)