From 25b6e0369d88c3da0c630d185b0e8554b8afcfcf Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 16 Nov 2023 19:11:47 +0900 Subject: [PATCH] [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. --- config.d/compiling.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/config.d/compiling.m4 b/config.d/compiling.m4 index f5603bd25..c8ce1e3d5 100644 --- a/config.d/compiling.m4 +++ b/config.d/compiling.m4 @@ -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=""