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

Add support for Apple Silicon #58

Closed Deadpikle closed 3 years ago

Deadpikle commented 4 years ago

This PR adds support for Apple Silicon!

Screen Shot 2020-07-30 at 11 02 19 AM

This PR also fixes an issue where the xcframework file cannot be made if more than one arch for macOS is used (e.g. i386 with x86_64).

Closes #57

faithfracture commented 4 years ago

Eek. Sorry @Deadpikle, missed this. Everything still applicable post-Xcode 12 GM / Release?

Deadpikle commented 4 years ago

No problem. I need to check -- I've not downloaded the Xcode 12 release yet. I'll have to get back to you. :)

Deadpikle commented 4 years ago

@faithfracture Sorry, no, GM for Xcode 12 doesn't include universal binary support. There's a note on the download page: "For development on macOS Big Sur or to support Apple silicon, continue to use Xcode 12 beta 6."

So, let's keep this PR in frozen mode until there's an official version of Xcode with silicon support -- which I'm guessing will come when Big Sur comes out -- or closer to that time? Then I'll take a look at this again.

faithfracture commented 4 years ago

Bah, of course. Ok, sounds good to me!

Deadpikle commented 3 years ago

@faithfracture Xcode 12.2 came out today. With it comes universal binary building and thus this PR now works!

Sample command:

./boost.sh --boost-version 1.74.0 --macos-sdk 10.15 --min-macos-version 10.10 --macos-silicon-sdk 11.0 --min-macos-silicon-version 11.0 --boost-libs "chrono date_time filesystem system timer"

Outputs:

Screen Shot 2020-11-12 at 5 21 24 PM

@Anil8753 I don't know, sorry. It would require more investigation on my part, and since I don't need it for work, I don't have time for that right now.

faithfracture commented 3 years ago

@Deadpikle Would you mind resolving the merge conflicts? I don't use Catalyst or Silicon currently and I don't want to screw up what you've done.

Deadpikle commented 3 years ago

Sure. Will get to it next week if I can.

Deadpikle commented 3 years ago

After some merging and ./boost.sh --boost-libs "chrono date_time filesystem system timer":

Screen Shot 2020-11-30 at 10 08 04 AM

Also fixed a small catalyst error in the help text that didn't affect functionality.

Deadpikle commented 3 years ago

@faithfracture Should be good to go assuming the CI finishes successfully. Did a quick test of the sample app and it seemed to work ok for iOS Catalyst and macOS. Still don't have a silicon device to test on, though. :(

Edit: Had to update the CI script to use the latest, stable Xcode so that Xcode 12.2 was used.

Deadpikle commented 3 years ago

Looks like CI is passing just fine 🥳

@faithfracture Ready for you whenever you are able to take a look.