Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iOS universal build #78

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kyzmitch
Copy link

Fix build of FAT binary for iOS platform when there is e.g. arm64 version of static library is present for both iOS device and simulator.

@kambala-decapitator
Copy link

I don't find this right. Instead, you should not pass --universal to obtain xcframework.

Alternatively, you can pass --no-framework to obtain separate builds and then lipo them separately for device and for simulator. But for that you'd also have to comment out the scrunchAllLibsTogetherInOneLibPerPlatform call at https://github.com/faithfracture/Apple-Boost-BuildScript/blob/master/boost.sh#L1806

@kyzmitch
Copy link
Author

Sorry, I didn't tell that my goal is to have static library only for use in c++ code in iOS app (no need to have Obj-c++ bindings). I'm passing --no-framework in addition to --universal and the app produces FAT static libraries with this change.

Could you clarify what did you mean by using lipo separately. I thought that --universal option could do this work already.

@kambala-decapitator
Copy link

my goal is to have static library only for use in c++ code in iOS app

you can also pack it in xcframework, it's not limited to objc

Could you clarify what did you mean by using lipo separately

I mean make separate libs for device and simulator: this will allow to have arm64 in both. Something like this: https://github.com/kambala-decapitator/vcmi-ios-depends/blob/main/deps/scripting/luajit.sh#L44-L47

@guillaumealgis
Copy link
Collaborator

I tend to agree with @kambala-decapitator , a xcframework seems like the "cleanest" output. @kyzmitch is this not an option for you ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants