Skip to content

Commit 764880e

Browse files
committed
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 golang#3285. R=bradfitz CC=golang-dev https://golang.org/cl/5777062
1 parent cd7ae05 commit 764880e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/cmd/api/goapi.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ var contexts = []*build.Context{
5252
{GOOS: "windows", GOARCH: "386"},
5353
}
5454

55+
func init() {
56+
for _, c := range contexts {
57+
c.Compiler = build.Default.Compiler
58+
}
59+
}
60+
5561
func contextName(c *build.Context) string {
5662
s := c.GOOS + "-" + c.GOARCH
5763
if c.CgoEnabled {

0 commit comments

Comments
 (0)