Skip to content

Commit ef603be

Browse files
committed
cmd/dist: restore GOARM=7 default for android/arm
Fixes the android/arm builder. Without it, the builder reported unexpected stale targets during bootstrap: https://build.golang.org/log/b951f1171be54cf4a12c2a0720ffaf07f8a11377 Tighten the GOARM=7 default in cmd/internal/objabi while here. Change-Id: I944744910193e72e91bc37b5bf0783076b45e579 Reviewed-on: https://go-review.googlesource.com/c/go/+/273167 Run-TryBot: Elias Naur <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Elias Naur <[email protected]>
1 parent 9dc2350 commit ef603be

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/cmd/dist/util.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@ func xsamefile(f1, f2 string) bool {
383383
}
384384

385385
func xgetgoarm() string {
386+
if goos == "android" {
387+
// Assume all android devices have VFPv3.
388+
// These ports are also mostly cross-compiled, so it makes little
389+
// sense to auto-detect the setting.
390+
return "7"
391+
}
386392
if gohostarch != "arm" || goos != gohostos {
387393
// Conservative default for cross-compilation.
388394
return "5"

src/cmd/internal/objabi/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ const (
4141

4242
func goarm() int {
4343
def := defaultGOARM
44-
if GOOS == "android" {
45-
// Android devices always support GOARM=7.
44+
if GOOS == "android" && GOARCH == "arm" {
45+
// Android arm devices always support GOARM=7.
4646
def = "7"
4747
}
4848
switch v := envOr("GOARM", def); v {

0 commit comments

Comments
 (0)