From 609d82b28992e6a7fac48add680f170c4eee83fd Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 12 Feb 2021 21:34:11 +0100 Subject: [PATCH] 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 Trust: Jason A. Donenfeld Run-TryBot: Jason A. Donenfeld TryBot-Result: Go Bot --- src/cmd/dist/util.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd/dist/util.go b/src/cmd/dist/util.go index 0a419e465f..e99375f538 100644 --- a/src/cmd/dist/util.go +++ b/src/cmd/dist/util.go @@ -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" -- 2.50.0