Skip to content

Commit 609d82b

Browse files
zx2c4rsc
authored andcommitted
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 (golang#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>
1 parent f0be3cc commit 609d82b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cmd/dist/util.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ func xgetgoarm() string {
389389
// sense to auto-detect the setting.
390390
return "7"
391391
}
392+
if goos == "windows" {
393+
// windows/arm only works with ARMv7 executables.
394+
return "7"
395+
}
392396
if gohostarch != "arm" || goos != gohostos {
393397
// Conservative default for cross-compilation.
394398
return "5"

0 commit comments

Comments
 (0)