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 support for mac arm (m1) runners #31234

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

sagudev
Copy link
Member

@sagudev sagudev commented Jan 31, 2024

https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #___ (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because ___

@sagudev
Copy link
Member Author

sagudev commented Jan 31, 2024

It would be nice if any mac owner could verify that builds work: https://github.com/sagudev/servo/actions/runs/7721819161

@sagudev sagudev marked this pull request as ready for review January 31, 2024 06:55
@mrobinson
Copy link
Member

Question about this: what kind of binary is this building? Isn't it more interesting to build a universal binary for now?

@sagudev
Copy link
Member Author

sagudev commented Jan 31, 2024

Currently separate binary per arch, but I expect that we can just do post step that would just join two binaries (no idea if this is even possible, i am not really familiar with macs). As far as I know universal needs to be compiled twice (every time for separate target) and doing natively rather than cross should be better.

@mrobinson
Copy link
Member

I'm fairly sure that the binaries we produce right now run just fine on ARM Macs. While a native binary might be nice, is it worth maintaining an entirely new build and then having a complicated step to merge the two binaries? I'm not sure I see the issue with cross-compilation either. What's the concern?

@sagudev
Copy link
Member Author

sagudev commented Jan 31, 2024

AFAIK we currently build in CI is for x86 arch and works only due to Rosetta (x86 emulation) on arm macs.

@mrobinson
Copy link
Member

It feels like the right thing to do is not to have two builds, but just have proper support for building "fat binaries" on MacOS.

@sagudev
Copy link
Member Author

sagudev commented Feb 10, 2024

Even if we build "fat binaries" we would still need to compile twice, so having it seperate will allow as to parallelize this better.

Also joining is indeed possible: https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary

@kklem0
Copy link

kklem0 commented Feb 21, 2024

It would be nice if any mac owner could verify that builds work: https://github.com/sagudev/servo/actions/runs/7721819161

It runs well.
Closing the browser with the close icon on top left freezes the browser, closing through menu works though and I don't think it's the build issue.

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

3 participants