From 8ccb9096b931ed613d47f82b43eefdd4ac779436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 17 Oct 2013 16:20:42 +0200 Subject: 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 --- mkspecs/macx-ios-clang/features/default_post.prf | 10 ---------- mkspecs/macx-ios-clang/features/qt_config.prf | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 mkspecs/macx-ios-clang/features/qt_config.prf (limited to 'mkspecs') 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 +} -- cgit v1.2.3