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>
This commit is contained in:
Tor Arne Vestbø 2013-10-17 16:20:42 +02:00 committed by The Qt Project
parent c768b0a7af
commit 8ccb9096b9
2 changed files with 12 additions and 10 deletions

View File

@ -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

View File

@ -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
}