]> Cypherpunks repositories - gostls13.git/commit
cmd/go: include the "-trimpath" flag in the stamped build settings
authorBryan C. Mills <bcmills@google.com>
Wed, 9 Mar 2022 17:01:16 +0000 (12:01 -0500)
committerBryan Mills <bcmills@google.com>
Fri, 18 Mar 2022 22:41:45 +0000 (22:41 +0000)
commite1fbf13896feb0b55050c22f5be0746f8a2ba01b
tree6a525b39bb1421f2895bd16a9d5b8a1bbfa88690
parent0433f5770b9c92b06d5a15c8d2a70f00597faac4
cmd/go: include the "-trimpath" flag in the stamped build settings

The -trimpath flag has a strong effect on the resulting binary:
in particular, it determines whether runtime.GOROOT can report
a meaningful path in the absence of an explicit GOROOT environment variable.

For #51461

Change-Id: Id0d55572c0a0a4e2e4724363ed80dfa05b202186
Reviewed-on: https://go-review.googlesource.com/c/go/+/391810
Trust: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/internal/load/pkg.go
src/cmd/go/testdata/script/version_build_settings.txt