From 8c5acf6573783fc0f9ca6e7301db52db6efc7741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Thu, 29 Oct 2015 14:59:59 +0100 Subject: configure: add link-time-optimization option Windows' configure.exe supports -ltcg since several years, this patch adds -ltcg to Unix's configure script. Change-Id: I3f39086c67c3f4cacd252f63de30e3cfc4aa22bb Reviewed-by: Oswald Buddenhagen --- configure | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configure b/configure index f60802a9b5..8f4aa8206d 100755 --- a/configure +++ b/configure @@ -703,6 +703,7 @@ CFG_OPENSSL=auto CFG_LIBPROXY=auto CFG_SECURETRANSPORT=auto CFG_PRECOMPILE=auto +CFG_LTCG=no CFG_SEPARATE_DEBUG_INFO=no CFG_REDUCE_EXPORTS=auto CFG_SSE2=auto @@ -1573,6 +1574,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + ltcg) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_LTCG="$VAL" + else + UNKNOWN_OPT=no + fi + ;; separate-debug-info) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_SEPARATE_DEBUG_INFO="$VAL" @@ -2641,6 +2649,9 @@ Additional options: * -no-pch ............ Do not use precompiled header support. -pch ............... Use precompiled header support. + * -no-ltcg Do not use Link Time Code Generation + -ltcg Use Link Time Code Generation. + -no-dbus ........... Do not compile the Qt D-Bus module. + -dbus-linked ....... Compile the Qt D-Bus module and link to libdbus-1. -dbus-runtime ...... Compile the Qt D-Bus module and dynamically load libdbus-1. @@ -6476,6 +6487,10 @@ if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then QT_CONFIG="$QT_CONFIG force_asserts" fi +if [ "$CFG_LTCG" = "yes" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG ltcg" +fi + if [ "$CFG_SANITIZERS" != "none" ]; then QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitizer" @@ -7232,6 +7247,7 @@ echo " Using C++ standard ..... $CFG_STDCXX" echo " Using gold linker....... $CFG_USE_GOLD_LINKER" echo " Using new DTAGS ........ $CFG_ENABLE_NEW_DTAGS" echo " Using PCH .............. $CFG_PRECOMPILE" +echo " Using LTCG ............. $CFG_LTCG" echo " Target compiler supports:" if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then echo " SSE2/SSE3/SSSE3 ...... ${CFG_SSE2}/${CFG_SSE3}/${CFG_SSSE3}" -- cgit v1.2.3