ios-cmake icon indicating copy to clipboard operation
ios-cmake copied to clipboard

Adds support for combined + ASi support

Open objectivecosta opened this issue 3 years ago • 3 comments
trafficstars

Adds support for combined + ASi support

objectivecosta avatar Aug 14 '22 21:08 objectivecosta

I don't think lipo can join arm64-device and arm64-simulator binaries, does this work?

hjmallon avatar Sep 08 '22 11:09 hjmallon

I don't think lipo can join arm64-device and arm64-simulator binaries, does this work?

I thought the intention of the PR is to produce fat simulator builds, but two arm64 slices definitely can't be combined with lipo

kambala-decapitator avatar Sep 08 '22 11:09 kambala-decapitator

set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] "arm64")
set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "x86_64 arm64")
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64")
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64 arm64")

It looks to me like it is trying to use CMAKE_IOS_INSTALL_COMBINED to make a arm64-device/arm64-sim/x86_64-sim combined binary. Also the name OS64COMBINED_ASI would match that.

I don't think this can work, unless CMake upstream integrated some fairly complete version of xcframework support (i.e. super fat structures with separate simulator and device binaries inside).

Fat arm64/x86_64 simulator builds is possible though (i.e. SIMULATORUNIVERSAL2 or SIMULATORARM64X8664 or something).

hjmallon avatar Sep 08 '22 11:09 hjmallon

Sorry for the delay... @hjmallon is correct, I wanted to create a fat version with everything possible. I think it is doable, don't know if .xcframework is needed.

I'm gonna go back to working on it and I'll get back here ;)

objectivecosta avatar Nov 02 '22 21:11 objectivecosta

Closed in favour of #178. Please create a new PR based off the latest master if still needed.

leetal avatar Nov 16 '23 09:11 leetal