GOEXPERIMENT is only set during make.bash, so checking the environment
variable isn't effectual. Instead, check the values exposed by objabi.
These experiments look potentially safe, but it seems too late in the
release cycle to try to assuage that. The one exception is frame
pointer experiment, which is trivially safe: it just amounts to
incrementing some stack offsets by PtrSize.
Fixes #22223.
Change-Id: I46dc7c54b1347143d02d6b9635038230cda6d164
Reviewed-on: https://go-review.googlesource.com/80760
Reviewed-by: Russ Cox <rsc@golang.org>
if Debug_vlog || debugstr != "" || debuglive > 0 {
return false
}
- // TODO: test and add builders for GOEXPERIMENT values, and enable
- if os.Getenv("GOEXPERIMENT") != "" {
+ // TODO: Test and delete these conditions.
+ if objabi.Fieldtrack_enabled != 0 || objabi.Preemptibleloops_enabled != 0 || objabi.Clobberdead_enabled != 0 {
return false
}
// TODO: fix races and enable the following flags
// TODO(rsc): Convince compiler team not to add more magic environment variables,
// or perhaps restrict the environment variables passed to subprocesses.
magic := []string{
- "GOEXPERIMENT",
"GOCLOBBERDEADHASH",
"GOSSAFUNC",
"GO_SSA_PHI_LOC_CUTOFF",
log.Fatalf("GO19CONCURRENTCOMPILATION must be 0, 1, or unset, got %q", e)
}
- if os.Getenv("GOEXPERIMENT") != "" {
- // Concurrent compilation is presumed incompatible with GOEXPERIMENTs.
- canDashC = false
- }
-
CheckFlags:
for _, flag := range gcflags {
// Concurrent compilation is presumed incompatible with any gcflags,