]> Cypherpunks repositories - gostls13.git/commit
internal/buildcfg: change GOEXPERIMENT to always return non-empty string
authorMatthew Dempsky <mdempsky@google.com>
Mon, 23 Aug 2021 18:40:56 +0000 (11:40 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 23 Aug 2021 20:04:34 +0000 (20:04 +0000)
commitfa34678c67275a765a9b78443806c8144d88fe3d
tree3926878cd461d66402d3772cf857ac7e45febf05
parent0a7f00ae239570d664488085f9c395919bc69066
internal/buildcfg: change GOEXPERIMENT to always return non-empty string

Rather than returning "", we now return "," (which is a no-op). This
ensures that the returned string always overrides DefaultGOEXPERIMENT.

This fixes a bootstrapping issue where GOROOT_BOOTSTRAP was built with
"GOEXPERIMENT=fieldtrack ./make.bash". cmd/dist sets GOEXPERIMENT=none
during bootstrapping, which was causing cmd/go to set GOEXPERIMENT=""
when executing cmd/compile; but then cmd/compile ignores the
environment variable (because it's empty) and instead uses
DefaultGOEXPERIMENT.

Fixes #47921.

Change-Id: I657ff6cdfb294a94f6a2f58c306ceed7f104416b
Reviewed-on: https://go-review.googlesource.com/c/go/+/344511
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/internal/buildcfg/exp.go