1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:24:50 -07:00

builder: run make single-threaded on windows

Will still honor MAKEFLAGS environment variable if set.

R=golang-dev
CC=bradfitz, golang-dev
https://golang.org/cl/4644049
This commit is contained in:
Alex Brainman 2011-06-21 12:26:38 +10:00
parent ceae2c9301
commit 524d02cbca

View File

@ -357,7 +357,10 @@ func (b *Builder) envv() []string {
"GOROOT_FINAL=/usr/local/go",
}
for _, k := range extraEnv {
e = append(e, k+"="+os.Getenv(k))
s, err := os.Getenverror(k)
if err == nil {
e = append(e, k+"="+s)
}
}
return e
}
@ -368,9 +371,14 @@ func (b *Builder) envvWindows() []string {
"GOOS": b.goos,
"GOARCH": b.goarch,
"GOROOT_FINAL": "/c/go",
// TODO(brainman): remove once we find make that does not hang.
"MAKEFLAGS": "-j1",
}
for _, name := range extraEnv {
start[name] = os.Getenv(name)
s, err := os.Getenverror(name)
if err == nil {
start[name] = s
}
}
skip := map[string]bool{
"GOBIN": true,