From c3a7d812d3cf30d23049cfd355c6290a7985f81d Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 25 Mar 2010 12:12:01 +0200 Subject: 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. 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 --- mkspecs/common/symbian/symbian.conf | 5 ++++- qmake/generators/symbian/symmake.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) 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; -- cgit v0.12