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

add arm64 arch to support Apple M1 #88

Merged
merged 1 commit into from May 8, 2021

Conversation

kevintom
Copy link
Contributor

@kevintom kevintom commented Mar 2, 2021

  • fix issue Support for ARM/M1 #87
  • add arch definition
  • update rake task to build binary
  • update to a universal binary
  • since M1 support only works on macOS 11+ versions I used lipo to create a universal binary as opposed to passing multiple arch argument flags to the compiler
  • this way we can keep the x86_64 version working on earlier versions of macOS.
  • I didn't recompile the x86 version, I simply used the exist version and merged it with the arm64 version.

first I renamed the x86_64 version

Screen Shot 2021-03-01 at 10 45 30 PM

then I built an arm64 version using the current macOS Big Sur SDK

Screen Shot 2021-03-01 at 10 31 54 PM

Next I renamed the arm64 version and I used lipo to produce a universal binary composed of the x86 version (compiled against the older SDK) and the arm64 (compiled against the current version of the SDK).

Screen Shot 2021-03-01 at 10 49 47 PM

- add arch definition
- add rake task to build binary
- update to a universal binary
@imajes imajes mentioned this pull request Mar 2, 2021
@kevintom
Copy link
Contributor Author

kevintom commented Mar 2, 2021

i forgot to mention, that you could use lipo to in theory add more supported architectures to the universal binary.

if you compiled the older PPC or i386 versions (at their respectively supported SDK versions) you could lipo them together to this binary to make a 'really' universal binary such that the released gem binary would work on all the architectures.

that is probably the biggest difference in approach between this PR and #89

@PabloC
Copy link

PabloC commented Apr 17, 2021

+1 for this!

@PabloC
Copy link

PabloC commented Apr 30, 2021

This branch works great, please merge! :)

@ecnelises
Copy link

Needs adding the owner to reviewer?

@thibaudgg
Copy link
Member

Hi @ecnelises, I plan to handle this over the weekend.
I don't have an M1 mac yet to test it myself so I will most likely just trust this PR, thanks all for your support. 👍🏻

@thibaudgg thibaudgg merged commit 6b5e078 into guard:master May 8, 2021
@thibaudgg
Copy link
Member

@kevintom version 0.11.0 has been released, thanks a lot for your work!

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.

None yet

4 participants