From: Robert Hencke Date: Wed, 14 Dec 2011 19:21:30 +0000 (-0800) Subject: gotest: use build.DefaultContext.GOARCH X-Git-Tag: weekly.2011-12-14~12 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=78821616d69c068bcab85e96ab97f0f157700840;p=gostls13.git gotest: use build.DefaultContext.GOARCH Fixes https://golang.org/cl/5480060/#msg4 R=golang-dev, r CC=golang-dev https://golang.org/cl/5485051 --- diff --git a/src/cmd/gotest/gotest.go b/src/cmd/gotest/gotest.go index 7b90bbd6ab..1c67828890 100644 --- a/src/cmd/gotest/gotest.go +++ b/src/cmd/gotest/gotest.go @@ -131,10 +131,7 @@ func setEnvironment() { // Basic environment. GOROOT = runtime.GOROOT() addEnv("GOROOT", GOROOT) - GOARCH = os.Getenv("GOARCH") - if GOARCH == "" { - GOARCH = runtime.GOARCH - } + GOARCH = build.DefaultContext.GOARCH addEnv("GOARCH", GOARCH) var err error O, err = build.ArchChar(GOARCH)