Skip to content

Commit

Permalink
build: add linker optimization flags to guix
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fanquake committed Apr 12, 2020
1 parent b8b050a commit f2b5b0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/guix/libexec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ HOST_CXXFLAGS="$HOST_CFLAGS"

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

Expand Down

0 comments on commit f2b5b0a

Please sign in to comment.