faithfracture / Apple-Boost-BuildScript

Script for building Boost for Apple platforms (iOS, iOS Simulator, tvOS, tvOS Simulator, OS X)
279 stars 111 forks source link

don't build for ARM simulator with Xcode < 12 #76

Open kambala-decapitator opened 2 years ago

kambala-decapitator commented 2 years ago

such attempt fails whole simulator build

kyzmitch commented 2 years ago

did you verify this with --universal, I guess it is different issue but anyway? I wanted to generate FAT library for iOS platform and lipo can't handle arm64 arch included from two places from iOS and iOS simulator

kambala-decapitator commented 2 years ago

@kyzmitch yes, you're facing a different issue. You can't lipo the same arch twice, that's why xcframeworks were invented.

guillaumealgis commented 2 years ago

I'm a bit uneasy with the solution. Quietly skipping an arch based on the Xcode version would probably be head scratching for the user.

Wouldn't the build failing because the arch is not supported by the build system be the expected behaviour ? And for someone still using Xcode 11, I think you can pass the archs you want to build for (skipping arm64 explicitly) to build without error, wouldn't you?

kambala-decapitator commented 2 years ago

@guillaumealgis the build does fail, not sure if the script returns non-zero code or not. We can also show a warning for example. What would you suggest?

I don't find forcing users to pass explicit archs convenient. In my use case I build all archs with different Xcode versions in a matrix using GitHub actions and I don't want the Xcode < 12 build to fail completely.