]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/objabi: make GOEXPERIMENT=none mean "no experiment flags"
authorAustin Clements <austin@google.com>
Fri, 9 Apr 2021 18:00:59 +0000 (14:00 -0400)
committerAustin Clements <austin@google.com>
Fri, 9 Apr 2021 19:11:12 +0000 (19:11 +0000)
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 <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/internal/objabi/exp.go

index 48201ae5ea5af94b70611603fb4063e88d7fc1ef..5ebbdac772792c2bd97da63298f8ddbdf60528ab 100644 (file)
@@ -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