summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius@trolltech.com>2009-05-13 11:58:18 (GMT)
committerMarius Storm-Olsen <marius@trolltech.com>2009-05-13 12:46:09 (GMT)
commit56191830cdad9cbaa81c2ed8f22f1b2650a5608a (patch)
treee5d5a02c283fd251be2a6753661b33729ccf9dac /mkspecs
parenta18ebd2a70e83863bc9a8cc64a65791a6d879f02 (diff)
downloadQt-56191830cdad9cbaa81c2ed8f22f1b2650a5608a.zip
Qt-56191830cdad9cbaa81c2ed8f22f1b2650a5608a.tar.gz
Qt-56191830cdad9cbaa81c2ed8f22f1b2650a5608a.tar.bz2
Turn off Link Time Code Generation (/LTCG) by default
Turning on LTCG affected too many projects, where customers applications would take a long time linking, severly affecting their development time (even though it was only added for release builds) We turn it off by default, and add a -ltcg configuration option, and the possibility to also do CONFIG+=ltcg in projects, should they not want it for Qt, but in their own projects. (Same, they can build Qt with it, and do CONFIG-=ltcg for their project) Reviewed-by: andy
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/win32/ltcg.prf5
-rw-r--r--mkspecs/win32-msvc2005/qmake.conf7
-rw-r--r--mkspecs/win32-msvc2008/qmake.conf7
3 files changed, 15 insertions, 4 deletions
diff --git a/mkspecs/features/win32/ltcg.prf b/mkspecs/features/win32/ltcg.prf
new file mode 100644
index 0000000..f6f1299
--- /dev/null
+++ b/mkspecs/features/win32/ltcg.prf
@@ -0,0 +1,5 @@
+CONFIG(release, debug|release) {
+ QMAKE_CFLAGS *= $$QMAKE_CFLAGS_LTCG
+ QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_LTCG
+ QMAKE_LFLAGS *= $$QMAKE_LFLAGS_LTCG
+}
diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf
index 00287cb..5ed8e01 100644
--- a/mkspecs/win32-msvc2005/qmake.conf
+++ b/mkspecs/win32-msvc2005/qmake.conf
@@ -19,9 +19,10 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD -GL
+QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_LTCG = -GL
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -30,6 +31,7 @@ QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_STL_ON = -EHsc
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
@@ -50,11 +52,12 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO /LTCG
+QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"
QMAKE_LFLAGS_DLL = /DLL
+QMAKE_LFLAGS_LTCG = /LTCG
QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
index b56b41c..373a36d 100644
--- a/mkspecs/win32-msvc2008/qmake.conf
+++ b/mkspecs/win32-msvc2008/qmake.conf
@@ -19,9 +19,10 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD -GL
+QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_LTCG = -GL
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -30,6 +31,7 @@ QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_STL_ON = -EHsc
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
@@ -50,11 +52,12 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO /LTCG
+QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"
QMAKE_LFLAGS_DLL = /DLL
+QMAKE_LFLAGS_LTCG = /LTCG
QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib