summaryrefslogtreecommitdiffstats
path: root/tools
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 /tools
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 'tools')
-rw-r--r--tools/configure/configureapp.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index bcbf557..91344c8 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -351,6 +351,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "QMAKESPEC" ] = tmp;
dictionary[ "INCREDIBUILD_XGE" ] = "auto";
+ dictionary[ "LTCG" ] = "no";
}
Configure::~Configure()
@@ -487,6 +488,12 @@ void Configure::parseCmdLine()
else if( configCmdLine.at(i) == "-commercial" ) {
dictionary[ "BUILDTYPE" ] = "commercial";
}
+ else if( configCmdLine.at(i) == "-ltcg" ) {
+ dictionary[ "LTCG" ] = "yes";
+ }
+ else if( configCmdLine.at(i) == "-no-ltcg" ) {
+ dictionary[ "LTCG" ] = "no";
+ }
#endif
else if( configCmdLine.at(i) == "-platform" ) {
@@ -1465,6 +1472,9 @@ bool Configure::displayHelp()
desc("SHARED", "yes", "-shared", "Create and use shared Qt libraries.");
desc("SHARED", "no", "-static", "Create and use static Qt libraries.\n");
+ desc("LTCG", "yes", "-ltcg", "Use Link Time Code Generation. (Release builds only)");
+ desc("LTCG", "no", "-no-ltcg", "Do not use Link Time Code Generation.\n");
+
desc("FAST", "no", "-no-fast", "Configure Qt normally by generating Makefiles for all project files.");
desc("FAST", "yes", "-fast", "Configure Qt quickly by generating Makefiles only for library and "
"subdirectory targets. All other Makefiles are created as wrappers "
@@ -2494,6 +2504,8 @@ void Configure::generateCachefile()
else
configStream << " static";
+ if( dictionary[ "LTCG" ] == "yes" )
+ configStream << " ltcg";
if( dictionary[ "STL" ] == "yes" )
configStream << " stl";
if ( dictionary[ "EXCEPTIONS" ] == "yes" )
@@ -2916,6 +2928,7 @@ void Configure::displayConfig()
cout << "Architecture................" << dictionary[ "ARCHITECTURE" ] << endl;
cout << "Maketool...................." << dictionary[ "MAKE" ] << endl;
cout << "Debug symbols..............." << (dictionary[ "BUILD" ] == "debug" ? "yes" : "no") << endl;
+ cout << "Link Time Code Generation..." << dictionary[ "LTCG" ] << endl;
cout << "Accessibility support......." << dictionary[ "ACCESSIBILITY" ] << endl;
cout << "STL support................." << dictionary[ "STL" ] << endl;
cout << "Exception support..........." << dictionary[ "EXCEPTIONS" ] << endl;