Commit 524d02cb authored by Alex Brainman's avatar Alex Brainman

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
parent ceae2c93
...@@ -357,7 +357,10 @@ func (b *Builder) envv() []string { ...@@ -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 { ...@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment