-
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
go: Apple Silicon updates #65696
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
Closed
Closed
go: Apple Silicon updates #65696
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objection to bootstrapping with a recent compiler. We'll probably need a recent version for ARM anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tried to build an ARM go with this compiler. I can get back to you with the lowest version that compiles the patched Go trunk later!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that 1.12.17 can build a native arm64 go.
bin/go is a amd64 build for some reason, but it's probably something that should wait until 1.16 is released, they might change some stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it's not a native arm64 go, is it? I don't understand that contradiction.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I failed to mention this in my original PR, but this PR itself isn't sufficient to build a native arm Go: this will have to wait for 1.16.
Which is why it's probably best if it's not merged until 1.16 (but this can be used as a reference of what needs to be done). I wanted to explore why bootstraped Go was crashing (as reported in Homebrew/brew#7857), and prepare some of the investigative work needed for 1.16.
I don't get that either, but if you build with this command, you get:
bin/darwin_arm64/ contains a fully working distribution that works perfectly if you move it somewhere and set it as your GOROOT: I've been using that for a couple days now.
Not sure why an amd go gets built in bin/ but I'm not really familiar with Go's make.bash and bootstrap.bash. It may be a simple build script difference between bootstrap.bash and make.bash?
It might require another change in the buildscript on arm though.
Edit:
Ah, I think that this happens because we're actually cross compiling to another arch, as shown by those two log lines:
It's annoyingly hard not to confuse arm64 and amd64 if you're not paying extra attention when reading. Thought those lines were the same at first