qt5base-lts/mkspecs/features/uikit/default_pre.prf

29 lines
880 B
Plaintext
Raw Normal View History

sim_and_dev = false
!isEmpty(QT_VERSION):qtConfig(simulator_and_device): \
sim_and_dev = true
$$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${device.sdk}.*): \
CONFIG += device $${device.sdk}
$$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
CONFIG += simulator $${simulator.sdk}
Remove simulator_and_device handling for the Makefile generator This patch moves towards a more sensible layout for UIKit platforms, where both the device and simulator architectures for binaries are combined into a single Mach-O file instead of separating out the simulator architecutures into separate _simulator.a files. This approach is both more common in the iOS ecosystem at large and significantly simplifies the implementation details for Qt, especially with the upcoming support for shared libraries on UIKit platforms. This patch takes advantage of the -Xarch compiler option to pass the appropriate -isysroot, -syslibroot, and -m*-version-min compiler and linker flags to the clang frontend, operating in exactly the same way as a normal multi-arch build for device or simulator did previously. Exclusive builds are still enabled for the xcodebuild wrapper Makefile, which builds all four configurations of a UIKit Xcode project as before, as expected. A particularly advantageous benefit of this change is that it flows very well with existing Xcode workflows, namely that: - Slicing out unused architectures is handled completely automatically for static builds, as an executable linking to a library with more architectures than it itself is linked as, the unused architectures will be ignored silently, resulting in the same behavior for users (and the App Store won't let you submit Intel architectures either). - Removing architectures from a fat binary using lipo does NOT invalidate the code signature of that file or its container if it is a bundle. This allows shared library and framework builds of Qt to work mostly automatically as well, since an Xcode shell script build phase can remove unused architectures from the embedded frameworks when that is implemented, and if Qt ever starts signing its SDK releases, it won't interfere with that either (though binaries are just resigned). Change-Id: I6c3578c78f75845a2fcc85f3a5b728ec997dbe90 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 13:07:54 +00:00
$$sim_and_dev {
# For a simulator_and_device build all the config tests
# are based on the device's ARM SDK, but we know that the simulator
# is Intel and that we support SSE/SSE2.
QT_CPU_FEATURES.$$QT_ARCH += sse sse2
CONFIG += sse sse2
DEFINES += QT_COMPILER_SUPPORTS_SSE2
Remove simulator_and_device handling for the Makefile generator This patch moves towards a more sensible layout for UIKit platforms, where both the device and simulator architectures for binaries are combined into a single Mach-O file instead of separating out the simulator architecutures into separate _simulator.a files. This approach is both more common in the iOS ecosystem at large and significantly simplifies the implementation details for Qt, especially with the upcoming support for shared libraries on UIKit platforms. This patch takes advantage of the -Xarch compiler option to pass the appropriate -isysroot, -syslibroot, and -m*-version-min compiler and linker flags to the clang frontend, operating in exactly the same way as a normal multi-arch build for device or simulator did previously. Exclusive builds are still enabled for the xcodebuild wrapper Makefile, which builds all four configurations of a UIKit Xcode project as before, as expected. A particularly advantageous benefit of this change is that it flows very well with existing Xcode workflows, namely that: - Slicing out unused architectures is handled completely automatically for static builds, as an executable linking to a library with more architectures than it itself is linked as, the unused architectures will be ignored silently, resulting in the same behavior for users (and the App Store won't let you submit Intel architectures either). - Removing architectures from a fat binary using lipo does NOT invalidate the code signature of that file or its container if it is a bundle. This allows shared library and framework builds of Qt to work mostly automatically as well, since an Xcode shell script build phase can remove unused architectures from the embedded frameworks when that is implemented, and if Qt ever starts signing its SDK releases, it won't interfere with that either (though binaries are just resigned). Change-Id: I6c3578c78f75845a2fcc85f3a5b728ec997dbe90 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 13:07:54 +00:00
}
unset(sim_and_dev)
load(default_pre)
# Check for supported Xcode versions
!versionAtLeast(QMAKE_XCODE_VERSION, 4.3): \
error("This mkspec requires Xcode 4.3 or later")
ios:shared:!versionAtLeast(QMAKE_IOS_DEPLOYMENT_TARGET, 8.0): \
QMAKE_IOS_DEPLOYMENT_TARGET = 8.0