-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
brew: re-exec under native arch if requested #9418
Conversation
4a7b140
to
961f4cc
Compare
Review period will end on 2020-12-07 at 17:06:19 UTC. |
@MikeMcQuaid if you approve, and if you think this is safely contained (and I believe it is, being protected behind |
Review period ended. |
I'm in a bit of a bind here… we recently decided to wait 1 week day to leave time for review, but I need this to merge in order to test it fully on ARM. And because I have a day job during the week, I really have time to work on this during the week-end. So, I'm going to go on a limb here, and merge for now. @MikeMcQuaid approved the basic principle on a previous version: #9417 If there is the slightest hint of trouble, I'll revert immediately. And @MikeMcQuaid if on Monday or whenever you can review, you think it was not suitable, I'll revert and apologise. |
Completed testing by building a native ARM bottle through github actions here: Homebrew/homebrew-core#66288 |
@fxcoudert this was the right decision, thanks for unblocking yourself 🙇🏻 |
We are in the process of setting up a CI runner for macOS Big Sur on ARM. However, github's action-runner is not available for macOS ARM, so at least in the short term we will run the action-runner under Rosetta 2. In that use case, we need
brew
to still run natively, even when it is launched from a Rosetta process.This PR allows this, and will let
brew
re-exec itself natively (under ARM architecture) if:HOMEBREW_CHANGE_ARCH_TO_ARM=1
hw.optional.arm64
)sysctl -n sysctl.proc_translated
)The idea and code is borrowed from @mistydemeo's pull request to do things the other away around #9287
With this patch, we have:
brew
: