aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-08-19 15:53:13 -0700
committerMatthew Dempsky <mdempsky@google.com>2021-08-21 00:24:02 +0000
commitc9912780ab3ecea3c685bfc8bec229c0d2b09317 (patch)
treecbd4c6664a7398e859ce687cd233f82c3a39fa0b /src/cmd
parent97d17dc02398730822abba75a3d3ae26c0f3c0fd (diff)
downloadgo-c9912780ab3ecea3c685bfc8bec229c0d2b09317.tar.gz
go-c9912780ab3ecea3c685bfc8bec229c0d2b09317.zip
cmd/compile: enable -G=3 by default
This CL changes cmd/compile's -G flag's default from 0 to 3, which enables use of the new types2 type checker and support for type parameters. The old type checker is still available with -gcflags=all=-G=0. The CL also updates the regress test harness to account for the change in default behavior (e.g., to expect known types2 changes/failures). However, the -G=0 mode is still being tested for now. Copy of CL 340914 by danscales@, minus the cmd/internal/objabi.AbsFile change (handled instead by CL 343731) and rebased to master branch. Updates #43651. Change-Id: I1f62d6c0a3ff245e15c5c0e8f3d922129fdd4f29 Reviewed-on: https://go-review.googlesource.com/c/go/+/343732 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/compile/internal/base/flag.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/base/flag.go b/src/cmd/compile/internal/base/flag.go
index b8b205f412..942659bcc0 100644
--- a/src/cmd/compile/internal/base/flag.go
+++ b/src/cmd/compile/internal/base/flag.go
@@ -140,6 +140,7 @@ type CmdFlags struct {
// ParseFlags parses the command-line flags into Flag.
func ParseFlags() {
+ Flag.G = 3
Flag.I = addImportDir
Flag.LowerC = 1