summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-04-10 17:43:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-13 18:36:46 +0200
commit78f3c1fb8e4b1de7ef2aa1e2a8768e842acc2777 (patch)
tree3c0ffa61ab30d0675c3f8c3c9bfc8cf08eeed8a0
parent5f9d58848a9e1a224dc5bf388e54d648e71ad259 (diff)
Make QT_CPU_FEATURES a map of features based on architecture
For now there's only one architecture per host/target, but this will change once we start detecting the CPU features for both device and simulator on iOS. For convenience we set QT_CPU_FEATURES to the resolved value of the current architecture, so that simd.prf still can use QT_CPU_FEATURES directly. Change-Id: I28e8b339a5c30a630e276165254dba09a3da6940 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rwxr-xr-xconfigure4
-rw-r--r--mkspecs/features/simd.prf3
-rw-r--r--tools/configure/configureapp.cpp6
3 files changed, 9 insertions, 4 deletions
diff --git a/configure b/configure
index cf72e2ba39..a52f5fbffd 100755
--- a/configure
+++ b/configure
@@ -6501,9 +6501,9 @@ fi
cat >>"$QTMODULE.tmp" <<EOF
host_build {
- QT_CPU_FEATURES = $CFG_HOST_CPUFEATURES
+ QT_CPU_FEATURES.$CFG_HOST_ARCH = $CFG_HOST_CPUFEATURES
} else {
- QT_CPU_FEATURES = $CFG_CPUFEATURES
+ QT_CPU_FEATURES.$CFG_ARCH = $CFG_CPUFEATURES
}
EOF
diff --git a/mkspecs/features/simd.prf b/mkspecs/features/simd.prf
index b430e59ff0..751f836a2d 100644
--- a/mkspecs/features/simd.prf
+++ b/mkspecs/features/simd.prf
@@ -12,6 +12,9 @@
# Get the SIMD flags
load(qt_build_config)
+# Set QT_CPU_FEATURES for convenience
+QT_CPU_FEATURES = $$eval(QT_CPU_FEATURES.$$QT_ARCH)
+
#
# Set up compilers for SIMD (SSE/AVX, NEON etc)
#
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 11cdc035b8..54c262ff20 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2872,9 +2872,11 @@ void Configure::generateCachefile()
moduleStream << endl;
moduleStream << "host_build {" << endl;
- moduleStream << " QT_CPU_FEATURES = " << dictionary["QT_HOST_CPU_FEATURES"] << endl;
+ moduleStream << " QT_CPU_FEATURES." << dictionary["QT_HOST_ARCH"] <<
+ " = " << dictionary["QT_HOST_CPU_FEATURES"] << endl;
moduleStream << "} else {" << endl;
- moduleStream << " QT_CPU_FEATURES = " << dictionary["QT_CPU_FEATURES"] << endl;
+ moduleStream << " QT_CPU_FEATURES." << dictionary["QT_ARCH"] <<
+ " = " << dictionary["QT_CPU_FEATURES"] << endl;
moduleStream << "}" << endl;
if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE")