From d85694ab4fdf1d8f99d6cb96878bfb7acab8df13 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 8 Apr 2022 16:02:59 -0400 Subject: [PATCH] doc/go1.19: document cmd/go changes involving -trimpath Updates #51461. Change-Id: Ie878a9f630062d62027de895750a070b50428a9f Reviewed-on: https://go-review.googlesource.com/c/go/+/399214 Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor --- doc/go1.19.html | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/go1.19.html b/doc/go1.19.html index c1523c57ec..21781c3e33 100644 --- a/doc/go1.19.html +++ b/doc/go1.19.html @@ -32,7 +32,27 @@ Do not send CLs removing the interior tags from such phrases.

Go command

- TODO: complete this section, or delete if not needed + TODO: complete this section. +

+ + +

+ Passing the -trimpath flag to go commands now + causes runtime.GOROOT() in the resulting binary to return the + empty string instead of the string "go". +

+

+ The -trimpath flag, if set, is now included in the build settings + stamped into Go binaries by go build, and can be + examined using + go version -m + or debug.ReadBuildInfo. +

+

+ go generate now sets the GOROOT + environment variable explicitly in the generator's environment, so that + generators can locate the correct GOROOT even if built + with -trimpath.

New unix build constraint