aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Liao <sean@liao.dev>2025-08-17 12:46:13 +0100
committerSean Liao <sean@liao.dev>2025-08-19 15:58:03 -0700
commit119546ea4fdded79057913a943bd3b6a8dcf8d4a (patch)
treed4fbee879373459c62a279c6df1a91fff7060ec3 /src
parentffa882059cfbfc7cd5f16c83d24775c08d63668f (diff)
downloadgo-119546ea4fdded79057913a943bd3b6a8dcf8d4a.tar.xz
cmd/go: document install outputs to $GOOS_$GOARCH when cross compiling
Fixes #74979 Change-Id: I2a93e3a78c953418cf62d93db107b9c8d25e8ed2 Reviewed-on: https://go-review.googlesource.com/c/go/+/696755 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Michael Matloob <matloob@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/go/alldocs.go2
-rw-r--r--src/cmd/go/internal/work/build.go2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 5587e01d0a..69102231d2 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -758,6 +758,8 @@
// variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH
// environment variable is not set. Executables in $GOROOT
// are installed in $GOROOT/bin or $GOTOOLDIR instead of $GOBIN.
+// Cross compiled binaries are installed in $GOOS_$GOARCH subdirectories
+// of the above.
//
// If the arguments have version suffixes (like @latest or @v1.0.0), "go install"
// builds packages in module-aware mode, ignoring the go.mod file in the current
diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
index 4f81f1390c..53f5b04a77 100644
--- a/src/cmd/go/internal/work/build.go
+++ b/src/cmd/go/internal/work/build.go
@@ -568,6 +568,8 @@ Executables are installed in the directory named by the GOBIN environment
variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH
environment variable is not set. Executables in $GOROOT
are installed in $GOROOT/bin or $GOTOOLDIR instead of $GOBIN.
+Cross compiled binaries are installed in $GOOS_$GOARCH subdirectories
+of the above.
If the arguments have version suffixes (like @latest or @v1.0.0), "go install"
builds packages in module-aware mode, ignoring the go.mod file in the current