cmd: use obj.GOOS, obj.GOARCH, etc

As cmd/internal/obj is coordinating the definition of GOOS, GOARCH,
etc across the compiler and linker, turn its functions into globals
and use them everywhere.

Change-Id: I5db5addda3c6b6435c37fd5581c7c3d9a561f492
Reviewed-on: https://go-review.googlesource.com/28854
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
David Crawshaw 2016-09-09 08:13:16 -04:00
parent f2f374d125
commit 791f71d192
34 changed files with 88 additions and 139 deletions

View file

@ -625,7 +625,6 @@ const (
// Link holds the context for writing object code from a compiler
// to be linker input or for reading that input into the linker.
type Link struct {
Goarm int32
Headtype HeadType
Arch *LinkArch
Debugasm int32