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

x/build: add builder for macOS on Apple silicon #39782

Open
cagedmantis opened this issue Jun 23, 2020 · 8 comments
Open

x/build: add builder for macOS on Apple silicon #39782

cagedmantis opened this issue Jun 23, 2020 · 8 comments

Comments

@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Jun 23, 2020

Apple has announced plans to transition their Mac platform to run on Apple silicon chips. A set of builders would be needed for the resulting port.

/cc @andybons @dmitshur @toothrot

@cagedmantis
Copy link
Contributor Author

@cagedmantis cagedmantis commented Jun 23, 2020

#38485 Tracks related changes to the runtime.

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jun 23, 2020

This issue corresponds to the following bullet points in https://golang.org/wiki/PortingPolicy#requirements-for-a-new-port:

  • A developer must be named (and agree) to maintain the builder, the machine trying each git revision and providing data for https://build.golang.org.

  • The builder must already be running (and failing, because the code is not yet in the main repository).

@dmitshur dmitshur added the arch-arm64 label Jun 23, 2020
@eacp
Copy link

@eacp eacp commented Jun 25, 2020

What about Universal Binaries?

@toothrot
Copy link
Contributor

@toothrot toothrot commented Jun 25, 2020

Hey @eacp, broader support for the new architecture will be discussed on a separate issue. This issue is just about our build infrastructure. Thanks!

@tzeejay
Copy link

@tzeejay tzeejay commented Jun 29, 2020

@toothrot Hey I have just received my DTK earlier today. Is there anything I can do to help the project with adoption of the architecture or help build prebuilt packages? I just installed the darwin-amd64 macOS package from golang.org and it took a bit to install but succeeded and go version is giving me this:

cj@cjs-Mac ~ % go version
go version go1.14.4 darwin/amd64

(I used to work for CircleCI and helped maintain the macOS infrastructure so I have a little bit of experience with this but I am entirely clueless as to what is required for Go)

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jun 29, 2020

@tzeejay Thanks for the offer to help! We're currently in the release freeze period for Go 1.15, so active work on this will likely wait until the tree re-opens in a bit over a month from now. Also follow issue #38485 for any port-specific updates. We'll reach out to you if we find a way you can contribute.

Based on what you said, it seems like the darwin/amd64 port is working via Rosetta 2, which is great to see.

@tzeejay
Copy link

@tzeejay tzeejay commented Jun 29, 2020

To be honest I have not yet had the time to compile the projects that I am working on for work (neither Objective-C nor Go).

Overall the system feels exactly like presented in the keynote. I can't wait to have code running on this that was actually compiled for it.
I am too young to have gone through an architecture transition like this so I am not sure where to begin. Once there is headroom to tackle this problem I would be very much interested in helping though 👍

@tzeejay
Copy link

@tzeejay tzeejay commented Jul 4, 2020

Little update for anybody interested.

  1. It does compile x86_64 code which can be executed through Rosetta 2 on the Mac itself. I develop our central server backend that way on my 16" MacBook Pro, and then deploy to Linux. Everything feels equivalent to a build on an Intel Mac.

  2. It successfully cross compiles to Linux x86_64.
    Granted I haven't added any crazy dependencies to it. It mostly depends on lib/pg and julienschmidt/httprouter.
    It is interesting to see though that this is possible at all with a regular release of Go from the website compiled for a foreign architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.