From f0c383b833da7da435f7390631807868cf2cbd63 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 1 May 2019 08:35:03 -0700 Subject: [PATCH] cmd/dist: only build exec wrappers when cross compiling Updates #31722 Change-Id: Ib44b46e628e364fff6eacda2b26541db2f0a4261 Reviewed-on: https://go-review.googlesource.com/c/go/+/174701 Run-TryBot: Elias Naur TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/cmd/dist/build.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go index 560b19b6801..a9c6c04c738 100644 --- a/src/cmd/dist/build.go +++ b/src/cmd/dist/build.go @@ -1425,6 +1425,9 @@ 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)