[build] Enable link-time optimizations

They seem to make a small difference. I guess QF is currently well
enough organized that LTO just doesn't have enough to work with, though
I suspect that will change when I make more use of the ECS.
This commit is contained in:
Bill Currie 2023-11-16 19:11:47 +09:00
parent d7258f09bd
commit 25b6e0369d

View file

@ -158,6 +158,7 @@ AC_MSG_CHECKING(for optimization)
if test "x$optimize" = xyes -a "x$leave_cflags_alone" != "xyes"; then
AC_MSG_RESULT(yes)
BUILD_TYPE="$BUILD_TYPE Optimize"
QF_CC_OPTION(-flto=auto)
if test "x$GCC" = xyes; then
saved_cflags="$CFLAGS"
dnl CFLAGS=""