Skip to content

mpy-cross: Build an arm64 (M1) bin and a universal bin #4832

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

Merged
merged 1 commit into from
May 31, 2021

Conversation

jepler
Copy link

@jepler jepler commented May 30, 2021

Untested, as I don't have mac hardware. However, Linux identifies the resulting files as expected:

mpy-cross:                 Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>
mpy-cross-arm64:           Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>
mpy-cross-macos-universal: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>] [arm64:Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>]

In theory, the x86_64 versions still work with catalina (and up, presumably), but the arm64 version (and maybe the universal version?) would be big sur only.

We should probably only merge this after positive testing from both x86_64 and m1 users.

@dhalbert
Copy link
Collaborator

I can test on M1.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Artifacts tested on M1 Mac Big Sur:
mpy-cross, mpy-cross-arm64, and mpy-cross-macos-universal

Artifacts tested on x64 Mac Big Sur:
mpy-cross, mpy-cross-macos-universal

Artifacts tested on x64 Mac High Sierra:
mpy-cross, mpy-cross-macos-universal

All worked and produced identical .mpy files.

@dhalbert dhalbert merged commit aade074 into adafruit:main May 31, 2021
@jepler
Copy link
Author

jepler commented May 31, 2021

Thanks for the testing!

@jepler jepler deleted the mpy-cross-macos-arm64-universal branch May 31, 2021 14:35
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.

2 participants