]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: set GOARM=7 for windows/arm
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 12 Feb 2021 20:34:11 +0000 (21:34 +0100)
committerRuss Cox <rsc@golang.org>
Thu, 18 Feb 2021 15:00:59 +0000 (15:00 +0000)
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>

src/cmd/dist/util.go

index 0a419e465fe87a7f3b088611aa56c8d7c50e5d5d..e99375f5380d8dc32052872110135cd8147e7ca4 100644 (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"