summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIain <qt-info@nokia.com>2010-01-22 17:18:06 (GMT)
committerIain <qt-info@nokia.com>2010-01-22 17:21:55 (GMT)
commit6b79cbf5cadbaebef8be895a47ca314724afb1a1 (patch)
tree9040d8eec0dda130e5f81a185390d3ab1a5449dc
parent7b8b83d2ea788e73a4c0f7dee09ba3394787e6bb (diff)
downloadQt-6b79cbf5cadbaebef8be895a47ca314724afb1a1.zip
Qt-6b79cbf5cadbaebef8be895a47ca314724afb1a1.tar.gz
Qt-6b79cbf5cadbaebef8be895a47ca314724afb1a1.tar.bz2
Improve DEF file enable/disable mechanism on Symbian
Provide configure flag to enable/disable the use of DEF files on Symbian. A useful side-effect was that it cleaned up how we control DEF files from qbase.pri and in WebKit. -nokia-developer still disables DEF files, as it triggers the autotest exports, which are not frozen into the DEF files. Disabling DEF files means that there is no BC with previously released versions of Qt, so this should only be used for development purposes. .pro files can specify custom locations for DEF files by setting defFilePath. Task-number: QTBUG-6556 Reviewed-by: Jason Barron
-rw-r--r--configure.exebin1176064 -> 1178624 bytes
-rw-r--r--mkspecs/features/symbian/def_files.prf26
-rw-r--r--mkspecs/features/symbian/def_files_disabled.prf7
-rw-r--r--src/qbase.pri36
-rw-r--r--tools/configure/configureapp.cpp26
5 files changed, 68 insertions, 27 deletions
diff --git a/configure.exe b/configure.exe
index d88da13..03cbf37 100644
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
new file mode 100644
index 0000000..c29d4ec
--- /dev/null
+++ b/mkspecs/features/symbian/def_files.prf
@@ -0,0 +1,26 @@
+# With DEF files enabled, removed exported symbols are treated as errors
+# and there is binary compatibility between successive builds.
+
+CONFIG -= def_files_disabled
+
+!isEmpty(defFilePath) {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+
+ MMP_RULES += defBlock
+} else {
+ # If defFilePath is not defined, then put the folders containing the DEF files at the
+ # same level as the .pro (and generated MMP) file(s)
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE ./bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE ./eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+
+ MMP_RULES += defBlock
+}
diff --git a/mkspecs/features/symbian/def_files_disabled.prf b/mkspecs/features/symbian/def_files_disabled.prf
new file mode 100644
index 0000000..d5c9505
--- /dev/null
+++ b/mkspecs/features/symbian/def_files_disabled.prf
@@ -0,0 +1,7 @@
+# With DEF files disabled, binary compatibility is broken every time you build
+
+CONFIG -= def_files
+
+# with EXPORTUNFROZEN enabled, new exports are included in the dll without
+# needing to run abld/sbs freeze
+MMP_RULES += EXPORTUNFROZEN
diff --git a/src/qbase.pri b/src/qbase.pri
index d9832a1..3307ae3 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -94,31 +94,17 @@ symbian {
DEFINES+=QT_MAKEDLL
TARGET.CAPABILITY = All -Tcb
- defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE ../s60installs/bwins/$${TARGET}.def" \
- "$${LITERAL_HASH}elif defined EABI" \
- "DEFFILE ../s60installs/eabi/$${TARGET}.def" \
- "$${LITERAL_HASH}endif"
-
- contains(QT_CONFIG, private_tests) {
- #When building autotest configuration, there are extra exports from
- #the Qt DLLs, which we don't want in the frozen DEF files.
- MMP_RULES += EXPORTUNFROZEN
- } else {
- #When building without autotests, DEF files are used by default.
- #This is to maintain binary compatibility with previous releases.
-
- #with defBlock enabled, removed exported symbols are treated as errors
- #and there is binary compatibility between successive builds.
- #with defBlock disabled, binary compatibility is broken every time you build
- MMP_RULES += defBlock
-
- #with EXPORTUNFROZEN enabled, new exports are included in the dll without
- #needing to run abld freeze, however binary compatibility is only maintained
- #for symbols that are frozen (and only if defBlock is also enabled)
- #the downside of EXPORTUNFROZEN is that the linker gets run twice
- #MMP_RULES += EXPORTUNFROZEN
+ # When building without autotests, DEF files are used by default.
+ # This is to maintain binary compatibility with previous releases.
+ # To explicitly disable DEF files usage, eg. when lots of code churn is
+ # going on, and functions may be added and removed before shipping,
+ # configure with -no-usedeffiles
+ # WARNING - disabling DEF files *will* break BC with previous released versions
+ # of Qt, and the only compatibility will be between this build of Qt and anything
+ # built in this exact environment. *Never* use this when building a version
+ # for release.
+ contains(QT_CONFIG, def_files) {
+ defFilePath=../s60installs
}
}
load(armcc_warnings)
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 919e68f..3f105b5 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -317,6 +317,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "OPENSSL" ] = "auto";
dictionary[ "DBUS" ] = "auto";
dictionary[ "S60" ] = "yes";
+ dictionary[ "SYMBIAN_DEFFILES" ] = "yes";
dictionary[ "STYLE_WINDOWS" ] = "yes";
dictionary[ "STYLE_WINDOWSXP" ] = "auto";
@@ -482,6 +483,7 @@ void Configure::parseCmdLine()
dictionary[ "BUILDNOKIA" ] = "yes";
dictionary[ "BUILDDEV" ] = "yes";
dictionary["LICENSE_CONFIRMED"] = "yes";
+ dictionary[ "SYMBIAN_DEFFILES" ] = "no";
}
else if( configCmdLine.at(i) == "-opensource" ) {
dictionary[ "BUILDTYPE" ] = "opensource";
@@ -803,7 +805,7 @@ void Configure::parseCmdLine()
else if( configCmdLine.at(i) == "-no-native-gestures" )
dictionary[ "NATIVE_GESTURES" ] = "no";
#if !defined(EVAL)
- // Others ---------------------------------------------------
+ // Symbian Support -------------------------------------------
else if (configCmdLine.at(i) == "-fpu" )
{
++i;
@@ -812,12 +814,17 @@ void Configure::parseCmdLine()
dictionary[ "ARM_FPU_TYPE" ] = configCmdLine.at(i);
}
- // S60 Support -------------------------------------------
else if( configCmdLine.at(i) == "-s60" )
dictionary[ "S60" ] = "yes";
else if( configCmdLine.at(i) == "-no-s60" )
dictionary[ "S60" ] = "no";
+ else if( configCmdLine.at(i) == "-usedeffiles" )
+ dictionary[ "SYMBIAN_DEFFILES" ] = "yes";
+ else if( configCmdLine.at(i) == "-no-usedeffiles" )
+ dictionary[ "SYMBIAN_DEFFILES" ] = "no";
+
+ // Others ---------------------------------------------------
else if (configCmdLine.at(i) == "-fast" )
dictionary[ "FAST" ] = "yes";
else if (configCmdLine.at(i) == "-no-fast" )
@@ -1823,6 +1830,8 @@ bool Configure::displayHelp()
desc( "-fpu <flags>", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2");
desc("S60", "no", "-no-s60", "Do not compile in S60 support.");
desc("S60", "yes", "-s60", "Compile with support for the S60 UI Framework\n");
+ desc("SYMBIAN_DEFFILES", "no", "no-usedeffiles", "Disable the usage of DEF files.");
+ desc("SYMBIAN_DEFFILES", "yes", "usedeffiles", "Enable the usage of DEF files.\n");
return true;
}
return false;
@@ -2744,6 +2753,11 @@ void Configure::generateCachefile()
if ( dictionary["PLUGIN_MANIFESTS"] == "no" )
configStream << " no_plugin_manifest";
+ if ( dictionary["SYMBIAN_DEFFILES"] == "yes" ) {
+ configStream << " def_files";
+ } else if ( dictionary["SYMBIAN_DEFFILES"] == "no" ) {
+ configStream << " def_files_disabled";
+ }
configStream << endl;
configStream << "QT_ARCH = " << dictionary[ "ARCHITECTURE" ] << endl;
if (dictionary["QT_EDITION"].contains("OPENSOURCE"))
@@ -3268,6 +3282,14 @@ void Configure::displayConfig()
cout << "Support for S60............." << dictionary[ "S60" ] << endl;
}
+ if (dictionary.contains("SYMBIAN_DEFFILES")) {
+ cout << "Symbian DEF files enabled..." << dictionary[ "SYMBIAN_DEFFILES" ] << endl;
+ if(dictionary["SYMBIAN_DEFFILES"] == "no") {
+ cout << "WARNING: Disabling DEF files will mean that Qt is NOT binary compatible with previous versions." << endl;
+ cout << " This feature is only intended for use during development, NEVER for release builds." << endl;
+ }
+ }
+
if(dictionary["ASSISTANT_WEBKIT"] == "yes")
cout << "Using WebKit as html rendering engine in Qt Assistant." << endl;