summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-03-25 10:12:01 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-03-26 08:47:23 (GMT)
commitc3a7d812d3cf30d23049cfd355c6290a7985f81d (patch)
treefa080b4d3e65158e40cebaf675a0800fc639b73d
parent039b057b95db7687867904e1a9a5046a8e3b3fc0 (diff)
downloadQt-c3a7d812d3cf30d23049cfd355c6290a7985f81d.zip
Qt-c3a7d812d3cf30d23049cfd355c6290a7985f81d.tar.gz
Qt-c3a7d812d3cf30d23049cfd355c6290a7985f81d.tar.bz2
Enable armcc version specific compler options for Symbian
VERSION_FLAGS.ARMCC variable is used in symbian.conf to define supported armcc compiler version flags. Values given to this variable must be directly usable as ifdef flags in mmp. QMAKE_CXXFLAGS.<version flag> variables can now be used to add compiler options to specific compiler versions. Note that options added via QMAKE_CXXFLAGS.ARMCC flag will apply to all versions of armcc compiler. Task-number: QTBUG-8685 Reviewed-by: Iain
-rw-r--r--mkspecs/common/symbian/symbian.conf5
-rw-r--r--qmake/generators/symbian/symmake.cpp10
2 files changed, 14 insertions, 1 deletions
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index c39b39d..d66d227 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -26,10 +26,13 @@ QMAKE_CFLAGS_RELEASE =
QMAKE_CFLAGS_DEBUG =
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+VERSION_FLAGS.ARMCC = ARMCC_4_0
QMAKE_CXX = g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS.CW =
-QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
+QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
+QMAKE_CXXFLAGS.ARMCC_4_0 = --import_all_vtbl
QMAKE_CXXFLAGS.GCCE = -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 1470a12..e1256d8 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -1246,6 +1246,16 @@ void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t)
t << MMP_OPTION_CW " " << cw << endl;
if (!armcc.isEmpty())
t << MMP_OPTION_ARMCC " " << armcc << endl;
+
+ foreach(QString armccVersion, project->values("VERSION_FLAGS.ARMCC")) {
+ QStringList currentValues = project->values("QMAKE_CXXFLAGS." + armccVersion);
+ if (currentValues.size()) {
+ t << "#if defined(" << armccVersion << ")" << endl;
+ t << MMP_OPTION_ARMCC " " << currentValues.join(" ") << endl;
+ t << "#endif" << endl;
+ }
+ }
+
if (!gcce.isEmpty())
t << MMP_OPTION_GCCE " " << gcce << endl;