summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-10-17 16:20:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-18 15:36:05 +0200
commit8ccb9096b931ed613d47f82b43eefdd4ac779436 (patch)
treeba2a126df8fb8680b33b73bda54ab9bf5549e0a1
parentc768b0a7af7dd1bb7dba2e124a2bb3c5df803f48 (diff)
iOS: Add default QT_ARCH for configure tests to our own qt_config.prf
Setting QT_ARCH when empty is a workaround for a missing qconfig.pri, since it hasn't been written yet by configure. As qconfig.pri is loaded by the generic qt_config.prf, putting our workaround in our own wrapper for qt_config makes sense, as it keeps the logic close to where the original QT_ARCH is resolved. Change-Id: I49ffc21cf5dea5ca5b6254ca8084a4dcdc359a72 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rw-r--r--mkspecs/macx-ios-clang/features/default_post.prf10
-rw-r--r--mkspecs/macx-ios-clang/features/qt_config.prf12
2 files changed, 12 insertions, 10 deletions
diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf
index e8dc859de6..0922a8e601 100644
--- a/mkspecs/macx-ios-clang/features/default_post.prf
+++ b/mkspecs/macx-ios-clang/features/default_post.prf
@@ -56,16 +56,6 @@ macx-xcode {
QMAKE_MAC_XCODE_SETTINGS += ios_device_family
}
-isEmpty(QT_ARCH) {
- # The iPhoneOS and iPhoneSimulator targets share the same toolchain,
- # so when configure runs the arch tests it passes the correct sysroot,
- # but we fail to pick up the architecture since we're not passing -arch
- # yet. Xcode does not seem to have a way to run the shared toolchain
- # in a way that will automatically do this (for example xcrun -sdk).
- contains(QMAKE_MAC_SDK, iphoneos.*): QT_ARCH = arm
- else: QT_ARCH = i386 # Simulator
-}
-
# Be more specific about which architecture we're targeting
equals(QT_ARCH, arm): \
actual_archs = armv7
diff --git a/mkspecs/macx-ios-clang/features/qt_config.prf b/mkspecs/macx-ios-clang/features/qt_config.prf
new file mode 100644
index 0000000000..d9a13f65eb
--- /dev/null
+++ b/mkspecs/macx-ios-clang/features/qt_config.prf
@@ -0,0 +1,12 @@
+load(qt_config)
+
+isEmpty(QT_ARCH) {
+ # The configure tests are run without QT_ARCH being resolved yet, which
+ # means we fail to pass -arch to the compiler, resulting in broke tests.
+ # As the Xcode toolchain doesn't seem to have a way to auto-detect the
+ # arch based on the SDK, we have to hard-code the arch for configure.
+ contains(QMAKE_MAC_SDK, iphoneos.*): \
+ QT_ARCH = arm
+ else: \ # Simulator
+ QT_ARCH = i386
+}