]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/api: set compiler for all build contexts.
authorDavid Symonds <dsymonds@golang.org>
Mon, 12 Mar 2012 00:25:38 +0000 (11:25 +1100)
committerDavid Symonds <dsymonds@golang.org>
Mon, 12 Mar 2012 00:25:38 +0000 (11:25 +1100)
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

index fe9c862f4f217e5b26db44ce3c65e2c69b3421df..552e2f331e1d2c7ba6a8d77833c0c5ceaed8677f 100644 (file)
@@ -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 {