diff options
Diffstat (limited to 'src/cmd/dist/build.go')
-rw-r--r-- | src/cmd/dist/build.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go index 33a329e48b..39f016e315 100644 --- a/src/cmd/dist/build.go +++ b/src/cmd/dist/build.go @@ -32,6 +32,7 @@ var ( goos string goarm string go386 string + goamd64 string gomips string gomips64 string goppc64 string @@ -145,6 +146,12 @@ func xinit() { } go386 = b + b = os.Getenv("GOAMD64") + if b == "" { + b = "v1" + } + goamd64 = b + b = os.Getenv("GOMIPS") if b == "" { b = "hardfloat" @@ -217,6 +224,7 @@ func xinit() { // For tools being invoked but also for os.ExpandEnv. os.Setenv("GO386", go386) + os.Setenv("GOAMD64", goamd64) os.Setenv("GOARCH", goarch) os.Setenv("GOARM", goarm) os.Setenv("GOHOSTARCH", gohostarch) @@ -1181,6 +1189,9 @@ func cmdenv() { if goarch == "386" { xprintf(format, "GO386", go386) } + if goarch == "amd64" { + xprintf(format, "GOAMD64", goamd64) + } if goarch == "mips" || goarch == "mipsle" { xprintf(format, "GOMIPS", gomips) } |