Skip to content

CMakeIOSInstallCombined: Enforce disjoint architecture sets

Gregor Jasny requested to merge gjasny/cmake:ios-combined-prune-archs into master

Starting with Xcode 12 the arm64 architecture is supported as an iOS device as well as simulator architecture.

But the fat macho file format does not distinguish by SDK, only by architecture. That makes lipo (rightfully) complain that it cannot add both architectures to a single file.

To work around we make sure that both SDKs are built for a disjoint set of architectures. If an architecture is present for both SDKs we prefer the currently configured one.

The log output has been extended to reflect that:

[iOS combined] Architectures (iphoneos): arm64 arm64e armv7 armv7s
[iOS combined] Architectures (iphonesimulator): arm64 arm64e i386 x86_64
[iOS combined] Architectures (iphonesimulator) after pruning: i386 x86_64

CC: @ruslo @craig.scott

Merge request reports