aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElias Naur <mail@eliasnaur.com>2019-05-02 03:12:12 -0400
committerBrad Fitzpatrick <bradfitz@golang.org>2019-05-02 14:48:02 +0000
commitd2c12634dedad9976dae0621d863d2cfb3a040bc (patch)
treefa9e9d632f77cf494930fb7f59431248e3978d97 /src
parentf03b3331c74ae45f0a5053287a26dd522f89f462 (diff)
downloadgo-d2c12634dedad9976dae0621d863d2cfb3a040bc.tar.xz
cmd/dist: don't generate exec wrappers for compatible cross compiles
This change will allow android/arm64 hosts to build for android/arm, and likewise for iOS. Updates #31722 Change-Id: Id410bd112abbab585ebb13b61fe4d3a38a1a81fb Reviewed-on: https://go-review.googlesource.com/c/go/+/174705 Run-TryBot: Elias Naur <mail@eliasnaur.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/dist/build.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index a9c6c04c73..2af6a2dd1b 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -1425,14 +1425,15 @@ func cmdbootstrap() {
}
func wrapperPathFor(goos, goarch string) string {
- if goos == gohostos && goarch == gohostarch {
- return ""
- }
switch {
case goos == "android":
- return pathf("%s/misc/android/go_android_exec.go", goroot)
+ if gohostos != "android" {
+ return pathf("%s/misc/android/go_android_exec.go", goroot)
+ }
case goos == "darwin" && (goarch == "arm" || goarch == "arm64"):
- return pathf("%s/misc/ios/go_darwin_arm_exec.go", goroot)
+ if gohostos != "darwin" || (gohostarch != "arm" && gohostarch != "arm64") {
+ return pathf("%s/misc/ios/go_darwin_arm_exec.go", goroot)
+ }
}
return ""
}