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/asm/main.go | |
| parent | 2fc0ebb623e2859094ad3f41e61325df0c2163f8 (diff) | |
| download | go-95ed5c3800a87ddf9b0ec3958eaaa1a969306293.tar.xz | |
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/asm/main.go')
| -rw-r--r-- | src/cmd/asm/main.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cmd/asm/main.go b/src/cmd/asm/main.go index 98618a67ef..e5a9ee565e 100644 --- a/src/cmd/asm/main.go +++ b/src/cmd/asm/main.go @@ -8,6 +8,7 @@ import ( "bufio" "flag" "fmt" + "internal/buildcfg" "log" "os" @@ -18,14 +19,14 @@ import ( "cmd/internal/bio" "cmd/internal/obj" - "cmd/internal/objabi" ) func main() { log.SetFlags(0) log.SetPrefix("asm: ") - GOARCH := objabi.GOARCH + buildcfg.Check() + GOARCH := buildcfg.GOARCH architecture := arch.Set(GOARCH) if architecture == nil { @@ -68,7 +69,7 @@ func main() { defer buf.Close() if !*flags.SymABIs { - fmt.Fprintf(buf, "go object %s %s %s\n", objabi.GOOS, objabi.GOARCH, objabi.Version) + fmt.Fprintf(buf, "go object %s %s %s\n", buildcfg.GOOS, buildcfg.GOARCH, buildcfg.Version) fmt.Fprintf(buf, "!\n") } |
