diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-11-12 15:50:50 +0200 |
---|---|---|
committer | Jesús Corrius <jcorrius@gmail.com> | 2013-11-16 09:01:32 +0000 |
commit | 18f9424ed77c27411f73dfad2be8e3b4ad97001f (patch) | |
tree | 228e3c5f6151f2b56b9d6e2e3491007f20769383 /configure.ac | |
parent | 9ab89a7599f79092027ae86b5b4cd0e3d67b8b4d (diff) |
Turn on LTO for MSVC when optimising unless told not to
Change-Id: Ifdb04238d02ff504bd517508851e93211d748b7d
Reviewed-on: https://gerrit.libreoffice.org/6652
Reviewed-by: Jesús Corrius <jcorrius@gmail.com>
Tested-by: Jesús Corrius <jcorrius@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 875c434983c6..9544ab7bcfd1 100644 --- a/configure.ac +++ b/configure.ac @@ -2495,6 +2495,12 @@ COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"` # Set the ENABLE_LTO variable # =================================================================== AC_MSG_CHECKING([whether to use link-time optimization]) +if test $_os = WINNT -a "$WITH_MINGW" != yes -a -z "$enable_lto" -a \ + \( -z "$enable_dbgutil" -o "$enable_dbgutil" = no \) -a \ + \( -z "$enable_debug" -o "$enable_debug" = no \); then + # Turn on LTO for MSVC when optimising unless told not to + enable_lto=yes +fi if test -n "$enable_lto" -a "$enable_lto" != "no"; then ENABLE_LTO="TRUE" AC_MSG_RESULT([yes]) |