aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/api
diff options
context:
space:
mode:
authorDavid Symonds <dsymonds@golang.org>2012-03-12 11:25:38 +1100
committerDavid Symonds <dsymonds@golang.org>2012-03-12 11:25:38 +1100
commit764880e2b2a025e7eb4dfdb226f50ff2586aa384 (patch)
tree4f5280cafebb7f2c31a1e430d3b82c99ee70bd7c /src/cmd/api
parentcd7ae05d52e4434453be9a4af2888aedc75330aa (diff)
downloadgo-764880e2b2a025e7eb4dfdb226f50ff2586aa384.tar.xz
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
Diffstat (limited to 'src/cmd/api')
-rw-r--r--src/cmd/api/goapi.go6
1 files changed, 6 insertions, 0 deletions
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 {