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:
parent
c768b0a7af
commit
8ccb9096b9
@ -56,16 +56,6 @@ macx-xcode {
|
|||||||
QMAKE_MAC_XCODE_SETTINGS += ios_device_family
|
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
|
# Be more specific about which architecture we're targeting
|
||||||
equals(QT_ARCH, arm): \
|
equals(QT_ARCH, arm): \
|
||||||
actual_archs = armv7
|
actual_archs = armv7
|
||||||
|
12
mkspecs/macx-ios-clang/features/qt_config.prf
Normal file
12
mkspecs/macx-ios-clang/features/qt_config.prf
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user