mirror of https://github.com/golang/go.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
This commit is contained in:
parent
cd7ae05d52
commit
764880e2b2
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue