From: David Symonds Date: Mon, 12 Mar 2012 00:25:38 +0000 (+1100) Subject: cmd/api: set compiler for all build contexts. X-Git-Tag: weekly.2012-03-13~53 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=764880e2b2a025e7eb4dfdb226f50ff2586aa384;p=gostls13.git cmd/api: set compiler for all build contexts. The generated syscall files for Windows are still breaking "go tool api" (unknown function []byte); I'll look at fixing that separately. Fixes #3285. R=bradfitz CC=golang-dev https://golang.org/cl/5777062 --- diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go index fe9c862f4f..552e2f331e 100644 --- a/src/cmd/api/goapi.go +++ b/src/cmd/api/goapi.go @@ -52,6 +52,12 @@ var contexts = []*build.Context{ {GOOS: "windows", GOARCH: "386"}, } +func init() { + for _, c := range contexts { + c.Compiler = build.Default.Compiler + } +} + func contextName(c *build.Context) string { s := c.GOOS + "-" + c.GOARCH if c.CgoEnabled {