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

build: add ios/amd64 as a GOOS/GOARCH #42100

Closed
aclements opened this issue Oct 20, 2020 · 13 comments
Closed

build: add ios/amd64 as a GOOS/GOARCH #42100

aclements opened this issue Oct 20, 2020 · 13 comments

Comments

@aclements
Copy link
Member

@aclements aclements commented Oct 20, 2020

As part of adding the macOS ARM64 port, we've reclaimed darwin/arm64 for macOS and added a new ios/arm64 GOOS/GOARCH for iOS. However, this left the iOS emulator for amd64 in the lurch: it continues to use the darwin/amd64 GOOS/GOARCH, plus an "ios" build tag. This seems quite inconsistent, so we propose adding ios/amd64 as a GOOS/GOARCH for the emulator.

This is in some sense a new port (or at least a renaming of an existing one), so it seemed prudent to run it through the proposal process. Obviously we're coming up on the freeze, but I don't expect this to be controversial, and I think it should land in the same release as ios/arm64. @eliasnaur already has a (quite simple) implementation ready: CL 263798.

/cc @cherrymui @eliasnaur @dmitshur

@gopherbot gopherbot added this to the Proposal milestone Oct 20, 2020
@gopherbot gopherbot added the Proposal label Oct 20, 2020
@ianlancetaylor ianlancetaylor added this to Incoming in Proposals Oct 20, 2020
@bcmills
Copy link
Member

@bcmills bcmills commented Oct 21, 2020

Is it possible to add a builder running the iOS emulator?

Per the porting policy, each port must have a builder with a designated maintainer. (We've run into issues in the past with regressions in otherwise-unsupported emulators, particularly QEMU user mode.)

@eliasnaur
Copy link
Contributor

@eliasnaur eliasnaur commented Oct 21, 2020

Is it possible to add a builder running the iOS emulator?

I suppose a macOS builder could be repurposed to start a simulator and run ios/amd64 tests. I did CL 255257 to support running Go programs and tests on the simulator, but I don't have the inclination to set up and maintain a builder. Even if I did, it would likely not make it in time for the freeze.

Per the porting policy, each port must have a builder with a designated maintainer. (We've run into issues in the past with regressions in otherwise-unsupported emulators, particularly QEMU user mode.)

As Austin alluded to above, it's technically not a new port. Using GOOS=darwin GOARCH=amd64 -tags=ios happened to work on the iOS simulator and I have never seen bugs in that support for gomobile nor Gio projects. It seems the ios/arm64 and darwin/amd64 builders provided enough coverage.

My interest in this is solely to move the already existing simulator support to the new (in Go 1.16) GOOS=ios, and not leave it at the awkward GOOS=darwin -tags=ios configuration.

@aclements
Copy link
Member Author

@aclements aclements commented Oct 21, 2020

Right. Ideally we would have a builder for this, but I don't know that the porting policy really applies here because this is something we already kind of support. This proposal is really about keeping the thing we already kind of support consistent with other changes.

@bcmills
Copy link
Member

@bcmills bcmills commented Oct 21, 2020

I guess part of what I'm saying is: if this is a configuration that we “already kind of support”, then we need a builder (regardless of whether it is GOOS=ios or GOOS=darwin -tags=ios) to ensure that that configuration doesn't regress.

@bcmills
Copy link
Member

@bcmills bcmills commented Oct 21, 2020

(Note that I am distinguishing here between “a configuration that we support” and “a configuration that happens to work today”.)

@rsc
Copy link
Contributor

@rsc rsc commented Oct 21, 2020

For android, what we do is GOOS=android but "linux" is implied as a build tag.
Is the suggestion to do the same here? GOOS=ios but "darwin" is implied as a build tag?

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Oct 21, 2020

@rsc GOOS=ios already implies "darwin", like GOOS=android implies "linux". This issue is about making it so that an iOS binary can be built for the iOS Simulator in AMD64 architecture using the GOOS=ios GOARCH=amd64 configuration, rather than what it was before (GOOS=darwin GOARCH=amd64 -tags=ios).

I posted a question in #38485 (comment) which is relevant (and probably would've been better to post in this issue instead).

The "GOOS=darwin GOARCH=amd64 -tags=ios" configuration was added in 2015, before there was as much attention paid to the porting policy as there is today. It was done with a single commit (see CL 12301) that resolved issue #11736.

I understand this proposal is to offer the same level of support for GOOS=ios GOARCH=amd64 as we did for GOOS=darwin GOARCH=amd64 -tags=ios.

Also CC @golang/release.

@rsc
Copy link
Contributor

@rsc rsc commented Oct 21, 2020

Sorry, I missed that amd64 is the important bit here, not ios. This is a clear yes.

@rsc rsc moved this from Incoming to Accepted in Proposals Oct 21, 2020
@rsc
Copy link
Contributor

@rsc rsc commented Oct 21, 2020

Accepted.

@rsc rsc changed the title proposal: add ios/amd64 as a GOOS/GOARCH build: add ios/amd64 as a GOOS/GOARCH Oct 21, 2020
@rsc rsc modified the milestones: Proposal, Backlog Oct 21, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Oct 21, 2020

Change https://golang.org/cl/263798 mentions this issue: all: add GOOS=ios GOARCH=amd64 target for the ios simulator

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 23, 2020

Change https://golang.org/cl/264738 mentions this issue: dashboard: skip ios-amd64 SlowBot alias

gopherbot pushed a commit to golang/build that referenced this issue Oct 23, 2020
It's known there is no builder for it yet.
Skip it so that TestSlowBotAliases passes.

For golang/go#42177.
Updates golang/go#42100.

Change-Id: I5f1a6b17e6aa4b57cbdea44f2eeb1d4817e5f67f
Reviewed-on: https://go-review.googlesource.com/c/build/+/264738
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
@gopherbot
Copy link

@gopherbot gopherbot commented Oct 26, 2020

Change https://golang.org/cl/265197 mentions this issue: cmd/dist: use GOOS=ios for iOS simulator test

gopherbot pushed a commit that referenced this issue Oct 28, 2020
Updates #42100.

Change-Id: Ib59432bea99a9dd6e25fbd759b31e423dc250f42
Reviewed-on: https://go-review.googlesource.com/c/go/+/265197
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@gopherbot
Copy link

@gopherbot gopherbot commented Nov 4, 2020

Change https://golang.org/cl/267718 mentions this issue: doc/go1.16: add release notes for darwin ports

gopherbot pushed a commit that referenced this issue Nov 10, 2020
Updates #38485, #42100.
For #40700.

Change-Id: I2caaa8482f13f9b79d4c2d2fdd242543981060cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/267718
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
bradfitz added a commit to tailscale/tailscale that referenced this issue Nov 11, 2020
Work with either way for now on iOS (darwin/arm64 vs ios/arm64).

In February when Go 1.16 comes out we'll have a universal binary for
darwin/arm64 (macOS) and will drop support for Go 1.15 and its
darwin/amd64 meaning iOS. (it'll mean macOS).

Context:

* https://tip.golang.org/doc/go1.16#darwin
* golang/go#38485
* golang/go#42100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Proposals
Accepted
Linked pull requests

Successfully merging a pull request may close this issue.

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