diff options
author | Russ Cox <rsc@golang.org> | 2021-04-15 23:05:49 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2021-04-16 19:20:53 +0000 |
commit | 95ed5c3800a87ddf9b0ec3958eaaa1a969306293 (patch) | |
tree | cb0c555f10ab706a5c491cbe48dd36da16658a1e /src/cmd/compile/internal/gc | |
parent | 2fc0ebb623e2859094ad3f41e61325df0c2163f8 (diff) | |
download | go-95ed5c3800a87ddf9b0ec3958eaaa1a969306293.tar.gz go-95ed5c3800a87ddf9b0ec3958eaaa1a969306293.zip |
internal/buildcfg: move build configuration out of cmd/internal/objabi
The go/build package needs access to this configuration,
so move it into a new package available to the standard library.
Change-Id: I868a94148b52350c76116451f4ad9191246adcff
Reviewed-on: https://go-review.googlesource.com/c/go/+/310731
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/compile/internal/gc')
-rw-r--r-- | src/cmd/compile/internal/gc/main.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/gc/main.go b/src/cmd/compile/internal/gc/main.go index 68506c7a7b..ce50cbb4c2 100644 --- a/src/cmd/compile/internal/gc/main.go +++ b/src/cmd/compile/internal/gc/main.go @@ -28,6 +28,7 @@ import ( "cmd/internal/src" "flag" "fmt" + "internal/buildcfg" "log" "os" "runtime" @@ -158,7 +159,7 @@ func Main(archInit func(*ssagen.ArchInfo)) { dwarf.EnableLogging(base.Debug.DwarfInl != 0) } if base.Debug.SoftFloat != 0 { - if objabi.Experiment.RegabiArgs { + if buildcfg.Experiment.RegabiArgs { log.Fatalf("softfloat mode with GOEXPERIMENT=regabiargs not implemented ") } ssagen.Arch.SoftFloat = true @@ -335,7 +336,7 @@ func writebench(filename string) error { } var buf bytes.Buffer - fmt.Fprintln(&buf, "commit:", objabi.Version) + fmt.Fprintln(&buf, "commit:", buildcfg.Version) fmt.Fprintln(&buf, "goos:", runtime.GOOS) fmt.Fprintln(&buf, "goarch:", runtime.GOARCH) base.Timer.Write(&buf, "BenchmarkCompile:"+base.Ctxt.Pkgpath+":") |