1
0
mirror of https://github.com/golang/go synced 2024-11-26 06:27:58 -07:00

cmd/dist: set GOARM=7 for windows/arm

GOARM=6 executables fail to launch on windows/arm, so set this to ARMv7
like we do for Android.

This CL is part of a stack adding windows/arm64
support (#36439), intended to land in the Go 1.17 cycle.

Change-Id: Ifa13685e7ab6edd367f3dfec10296e376319dbd4
Reviewed-on: https://go-review.googlesource.com/c/go/+/291629
Reviewed-by: Russ Cox <rsc@golang.org>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Jason A. Donenfeld 2021-02-12 21:34:11 +01:00 committed by Russ Cox
parent f0be3cc547
commit 609d82b289

View File

@ -389,6 +389,10 @@ func xgetgoarm() string {
// sense to auto-detect the setting.
return "7"
}
if goos == "windows" {
// windows/arm only works with ARMv7 executables.
return "7"
}
if gohostarch != "arm" || goos != gohostos {
// Conservative default for cross-compilation.
return "5"