From 756e2b1529592ffbe1760932d14f8e6eae3fda06 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 9 Apr 2021 14:00:59 -0400 Subject: [PATCH] cmd/internal/objabi: make GOEXPERIMENT=none mean "no experiment flags" CL 307819 made GOEXPERIMENT=none mean "restore baseline experiment configuration". This is arguably what you want because any deviation from the baseline configuration is an "experiment". However, cmd/dist requires this to mean "disable all experiment flags", even if some flags are enabled in the baseline configuration, because its build system doesn't know how to deal with any enabled experiment flags. Hence, make GOEXPERIMENT=none mean "disable all experiment flags" again. Change-Id: I1e282177c3f62a55eb9c36566c75672808dae9b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/309010 Trust: Austin Clements Run-TryBot: Austin Clements Reviewed-by: Matthew Dempsky --- src/cmd/internal/objabi/exp.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cmd/internal/objabi/exp.go b/src/cmd/internal/objabi/exp.go index 48201ae5ea..5ebbdac772 100644 --- a/src/cmd/internal/objabi/exp.go +++ b/src/cmd/internal/objabi/exp.go @@ -54,9 +54,10 @@ func parseExperiments() goexperiment.Flags { continue } if f == "none" { - // GOEXPERIMENT=none restores the baseline configuration. - // (This is useful for overriding make.bash-time settings.) - flags = goexperiment.BaselineFlags + // GOEXPERIMENT=none disables all experiment flags. + // This is used by cmd/dist, which doesn't know how + // to build with any experiment flags. + flags = goexperiment.Flags{} continue } val := true -- 2.48.1