mirror of
https://github.com/golang/go
synced 2024-11-13 15:40:20 -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:
parent
ceae2c9301
commit
524d02cbca
@ -357,7 +357,10 @@ func (b *Builder) envv() []string {
|
|||||||
"GOROOT_FINAL=/usr/local/go",
|
"GOROOT_FINAL=/usr/local/go",
|
||||||
}
|
}
|
||||||
for _, k := range extraEnv {
|
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
|
return e
|
||||||
}
|
}
|
||||||
@ -368,9 +371,14 @@ func (b *Builder) envvWindows() []string {
|
|||||||
"GOOS": b.goos,
|
"GOOS": b.goos,
|
||||||
"GOARCH": b.goarch,
|
"GOARCH": b.goarch,
|
||||||
"GOROOT_FINAL": "/c/go",
|
"GOROOT_FINAL": "/c/go",
|
||||||
|
// TODO(brainman): remove once we find make that does not hang.
|
||||||
|
"MAKEFLAGS": "-j1",
|
||||||
}
|
}
|
||||||
for _, name := range extraEnv {
|
for _, name := range extraEnv {
|
||||||
start[name] = os.Getenv(name)
|
s, err := os.Getenverror(name)
|
||||||
|
if err == nil {
|
||||||
|
start[name] = s
|
||||||
|
}
|
||||||
}
|
}
|
||||||
skip := map[string]bool{
|
skip := map[string]bool{
|
||||||
"GOBIN": true,
|
"GOBIN": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user