The ARM-based Mac rumors of the past couple years continue to heat up (e.g. https://www.theverge.com/2020/3/27/21196611/arm-macbook-desktop-apple-2021-release-date)
Has anybody given any thought to what we're going to do with runtime.GOOS and runtime.GOARCH if/when that happens, so we don't add ambiguity between darwin/arm64 (which currently means iOS only) and darwin/arm64 (which might also mean macOS in the future)?
Changing GOARCH seems out.
Adding GOOS=macos would break any code that switches on those values.
Perhaps some magic behavior like we did for GOOS=android (implies linux build tags) and GOOS=illumos (implies solaris build tags)? But what would still break code that checks runtime.GOOS.
Perhaps keep darwin/arm64 on both iOS and macOS but add some some runtime exported const DarwinOS = {"macos", "ios", ""} that people could switch on when it matters?
If there's new API, might be nice to get that in earlier. But OTOH, don't want to jump the gun if rumors don't pan out.
The ARM-based Mac rumors of the past couple years continue to heat up (e.g. https://www.theverge.com/2020/3/27/21196611/arm-macbook-desktop-apple-2021-release-date)
Has anybody given any thought to what we're going to do with runtime.GOOS and runtime.GOARCH if/when that happens, so we don't add ambiguity between
darwin/arm64(which currently means iOS only) anddarwin/arm64(which might also mean macOS in the future)?Changing GOARCH seems out.
Adding
GOOS=macoswould break any code that switches on those values.Perhaps some magic behavior like we did for
GOOS=android(implieslinuxbuild tags) andGOOS=illumos(impliessolarisbuild tags)? But what would still break code that checksruntime.GOOS.Perhaps keep
darwin/arm64on both iOS and macOS but add some someruntimeexportedconst DarwinOS = {"macos", "ios", ""}that people could switch on when it matters?If there's new API, might be nice to get that in earlier. But OTOH, don't want to jump the gun if rumors don't pan out.