]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document install outputs to $GOOS_$GOARCH when cross compiling
authorSean Liao <sean@liao.dev>
Sun, 17 Aug 2025 11:46:13 +0000 (12:46 +0100)
committerSean Liao <sean@liao.dev>
Tue, 19 Aug 2025 22:58:03 +0000 (15:58 -0700)
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>
src/cmd/go/alldocs.go
src/cmd/go/internal/work/build.go

index 5587e01d0ac6f91f012093083807182edb7d8623..69102231d2fa278f5503a8d5d61b4a2a4125dc62 100644 (file)
 // 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
index 4f81f1390c2146d10a7bcde873784a8b2ae4e11d..53f5b04a77d3a546a80ac33df721659d7179fff6 100644 (file)
@@ -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