2016-10-27 08:36:01 +00:00
|
|
|
sim_and_dev = false
|
|
|
|
!isEmpty(QT_VERSION):qtConfig(simulator_and_device): \
|
|
|
|
sim_and_dev = true
|
2012-11-23 12:26:50 +00:00
|
|
|
|
2016-10-27 08:36:01 +00:00
|
|
|
$$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
|
|
|
|
2016-10-27 08:36:01 +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
|
|
|
}
|
2013-10-25 15:20:05 +00:00
|
|
|
|
2016-10-27 08:36:01 +00:00
|
|
|
unset(sim_and_dev)
|
|
|
|
|
fix QMAKE_DEFAULT_*DIRS resolution with apple SDK, take 2
the code got factored out to an own toolchain.prf file, which is
load()ed from default_pre.prf, so no change at first.
however, on mac, we shadow toolchain.prf, and make it load() sdk.prf
first.
a side effect, it has become harder to disable the use of an sdk
altogether: putting CONFIG-=sdk into a project file or the qmake
command line has no effect now. instead, it's possible to put it into
.qmake.{conf,cache}.
to make it simpler again, it's conceivable to finally add qmake -pre,
which would allow setting variables before default_pre.prf is executed.
take 2: there was nothing wrong with the original patch, but in 5.8,
CONFIG+=simulator_and_device moved from qconfig.pri to various prf files
that would do it according to the simulator_and_device configure
feature, which would be way too late for the "pulled ahead" sdk.prf
loading. as simulator_and_device is now gone entirely, it is safe to
re-apply this patch (mostly) as-is.
Task-number: QTBUG-56144
Change-Id: I6cf484982eaed8af39f7a539c60f5a087a299914
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-14 11:14:13 +00:00
|
|
|
load(default_pre)
|
|
|
|
|
2013-05-08 10:21:05 +00:00
|
|
|
# Check for supported Xcode versions
|
|
|
|
lessThan(QMAKE_XCODE_VERSION, "4.3"): \
|
|
|
|
error("This mkspec requires Xcode 4.3 or later")
|
2016-02-18 11:41:15 +00:00
|
|
|
|
|
|
|
ios:shared:lessThan(QMAKE_IOS_DEPLOYMENT_TARGET, "8.0"): \
|
|
|
|
QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
|