From 764880e2b2a025e7eb4dfdb226f50ff2586aa384 Mon Sep 17 00:00:00 2001 From: David Symonds Date: Mon, 12 Mar 2012 11:25:38 +1100 Subject: [PATCH] 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 --- src/cmd/api/goapi.go | 6 ++++++ 1 file changed, 6 insertions(+) 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 { -- 2.50.0