From 78821616d69c068bcab85e96ab97f0f157700840 Mon Sep 17 00:00:00 2001 From: Robert Hencke Date: Wed, 14 Dec 2011 11:21:30 -0800 Subject: [PATCH] gotest: use build.DefaultContext.GOARCH Fixes https://golang.org/cl/5480060/#msg4 R=golang-dev, r CC=golang-dev https://golang.org/cl/5485051 --- src/cmd/gotest/gotest.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cmd/gotest/gotest.go b/src/cmd/gotest/gotest.go index 7b90bbd6ab0..1c678288908 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)