mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/go: include default GOEXPERIMENT in build config
Currently, the build config includes GOEXPERIMENT environment variable if it is not empty, but that doesn't take the default value (set at make.bash/bat/rc time) into consideration. This may cause standard library packages appearing stale, as the build config appears changed. This CL changes it to use cfg.GOEXPERIMENT variable, which includes the default value (if it is not overwritten). May fix regabi and staticlockranking builders. Change-Id: I242f887167f8e99192010be5c1a046eb88ab0c2a Reviewed-on: https://go-review.googlesource.com/c/go/+/301269 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
9289c12002
commit
086357e8f6
1 changed files with 2 additions and 2 deletions
|
|
@ -276,7 +276,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
|
||||||
key, val := cfg.GetArchEnv()
|
key, val := cfg.GetArchEnv()
|
||||||
fmt.Fprintf(h, "%s=%s\n", key, val)
|
fmt.Fprintf(h, "%s=%s\n", key, val)
|
||||||
|
|
||||||
if exp := cfg.Getenv("GOEXPERIMENT"); exp != "" {
|
if exp := cfg.GOEXPERIMENT; exp != "" {
|
||||||
fmt.Fprintf(h, "GOEXPERIMENT=%q\n", exp)
|
fmt.Fprintf(h, "GOEXPERIMENT=%q\n", exp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1250,7 +1250,7 @@ func (b *Builder) printLinkerConfig(h io.Writer, p *load.Package) {
|
||||||
key, val := cfg.GetArchEnv()
|
key, val := cfg.GetArchEnv()
|
||||||
fmt.Fprintf(h, "%s=%s\n", key, val)
|
fmt.Fprintf(h, "%s=%s\n", key, val)
|
||||||
|
|
||||||
if exp := cfg.Getenv("GOEXPERIMENT"); exp != "" {
|
if exp := cfg.GOEXPERIMENT; exp != "" {
|
||||||
fmt.Fprintf(h, "GOEXPERIMENT=%q\n", exp)
|
fmt.Fprintf(h, "GOEXPERIMENT=%q\n", exp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue