aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/main.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2017-04-18 12:53:25 -0700
committerMatthew Dempsky <mdempsky@google.com>2017-04-19 00:00:09 +0000
commit1e3570ac86f6aeb7f8ce70b5ad236a5dd92ec804 (patch)
tree6bb1e704f068dee9f7e95eb0d1b5ed1829441c8b /src/cmd/compile/main.go
parentf71f32e5e155ae5b7f60005c939746637086f30e (diff)
downloadgo-1e3570ac86f6aeb7f8ce70b5ad236a5dd92ec804.tar.gz
go-1e3570ac86f6aeb7f8ce70b5ad236a5dd92ec804.zip
cmd/internal/objabi: extract shared functionality from obj
Now only cmd/asm and cmd/compile depend on cmd/internal/obj. Changing the assembler backends no longer requires reinstalling cmd/link or cmd/addr2line. There's also now one canonical definition of the object file format in cmd/internal/objabi/doc.go, with a warning to update all three implementations. objabi is still something of a grab bag of unrelated code (e.g., flag and environment variable handling probably belong in a separate "tool" package), but this is still progress. Fixes #15165. Fixes #20026. Change-Id: Ic4b92fac7d0d35438e0d20c9579aad4085c5534c Reviewed-on: https://go-review.googlesource.com/40972 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Diffstat (limited to 'src/cmd/compile/main.go')
-rw-r--r--src/cmd/compile/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/main.go b/src/cmd/compile/main.go
index e67e862dd5..e699b91f5d 100644
--- a/src/cmd/compile/main.go
+++ b/src/cmd/compile/main.go
@@ -14,7 +14,7 @@ import (
"cmd/compile/internal/ppc64"
"cmd/compile/internal/s390x"
"cmd/compile/internal/x86"
- "cmd/internal/obj"
+ "cmd/internal/objabi"
"fmt"
"log"
"os"
@@ -40,9 +40,9 @@ func main() {
log.SetFlags(0)
log.SetPrefix("compile: ")
- archInit, ok := archInits[obj.GOARCH]
+ archInit, ok := archInits[objabi.GOARCH]
if !ok {
- fmt.Fprintf(os.Stderr, "compile: unknown architecture %q\n", obj.GOARCH)
+ fmt.Fprintf(os.Stderr, "compile: unknown architecture %q\n", objabi.GOARCH)
os.Exit(2)
}