diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-09-20 20:18:45 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-09-29 21:51:18 +0000 |
commit | 28f5d7931656d210364a0aba0b87f1b412e10165 (patch) | |
tree | 78b861af9aa3b4206e186de6d09d97a630750600 /mkspecs/features/uikit | |
parent | e66d181e659a08d19ab7d144c3ba0619d537de83 (diff) |
Share the multi-arch infrastructure between UIKit and macOS
There's no reason for this to be separated, regardless of the
support status of i386 macOS builds. Additional architectures may
appear in the future (and currently there's actually 3 - i386,
x86_64, and x86_64h for Haswell CPUs). So this feature could be
used to get combined generic x86_64 and Haswell builds. Some
system libraries appear to have an x86_64h slice in Sierra.
[ChangeLog][Build System] Support for universal binaries on macOS
has been re-introduced.
Change-Id: I1c89904addf024431fdb3ad03ea8ab85da7240ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'mkspecs/features/uikit')
-rw-r--r-- | mkspecs/features/uikit/default_post.prf | 35 | ||||
-rw-r--r-- | mkspecs/features/uikit/qt_config.prf | 19 | ||||
-rw-r--r-- | mkspecs/features/uikit/sdk.prf | 2 |
3 files changed, 1 insertions, 55 deletions
diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf index 9a231ffc84..cfd5388d33 100644 --- a/mkspecs/features/uikit/default_post.prf +++ b/mkspecs/features/uikit/default_post.prf @@ -67,38 +67,3 @@ macx-xcode { } } } - -macx-xcode { - arch_device.name = "ARCHS[sdk=$${device.sdk}*]" - arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" - - arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS - arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS - QMAKE_XCODE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS $$QMAKE_APPLE_SIMULATOR_ARCHS - - QMAKE_MAC_XCODE_SETTINGS += arch_device arch_simulator - - only_active_arch.name = ONLY_ACTIVE_ARCH - only_active_arch.value = YES - only_active_arch.build = debug - QMAKE_MAC_XCODE_SETTINGS += only_active_arch -} else { - VALID_ARCHS = - !simulator|simulator_and_device: VALID_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS - simulator: VALID_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS - - single_arch: VALID_ARCHS = $$first(VALID_ARCHS) - - ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) - ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch)) - - QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS - - arch_flags = $(EXPORT_ARCH_ARGS) - - QMAKE_CFLAGS += $$arch_flags - QMAKE_CXXFLAGS += $$arch_flags - QMAKE_LFLAGS += $$arch_flags - - QMAKE_PCH_ARCHS = $$VALID_ARCHS -} diff --git a/mkspecs/features/uikit/qt_config.prf b/mkspecs/features/uikit/qt_config.prf deleted file mode 100644 index 5fa5a536f8..0000000000 --- a/mkspecs/features/uikit/qt_config.prf +++ /dev/null @@ -1,19 +0,0 @@ -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, $${device.sdk}.*) { - QT_ARCH = arm - } else { # Simulator - ios: QT_ARCH = i386 - tvos: QT_ARCH = x64 - watchos: QT_ARCH = i386 - } - - # Prevent the arch/config tests from building as multi-arch binaries, - # as we only want the lowest common denominator features. - CONFIG += single_arch -} diff --git a/mkspecs/features/uikit/sdk.prf b/mkspecs/features/uikit/sdk.prf index 54674eb396..0ab553f587 100644 --- a/mkspecs/features/uikit/sdk.prf +++ b/mkspecs/features/uikit/sdk.prf @@ -7,7 +7,7 @@ contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*) { CONFIG += simulator $${simulator.sdk} } -build_pass:simulator: \ +build_pass:!simulator_and_device:simulator: \ QMAKE_MAC_SDK ~= s,^$${device.sdk},$${simulator.sdk}, load(sdk) |