diff --git a/src/cmd/dist/main.go b/src/cmd/dist/main.go index 0dc409fc77..6194ea901c 100644 --- a/src/cmd/dist/main.go +++ b/src/cmd/dist/main.go @@ -159,6 +159,12 @@ func main() { if gohostarch == "arm" || gohostarch == "mips64" || gohostarch == "mips64le" { maxbg = min(maxbg, runtime.NumCPU()) } + // For deterministic make.bash debugging and for smallest-possible footprint, + // pay attention to GOMAXPROCS=1. This was a bad idea for 1.4 bootstrap, but + // the bootstrap version is now 1.17+ and thus this is fine. + if runtime.GOMAXPROCS(0) == 1 { + maxbg = 1 + } bginit() if len(os.Args) > 1 && os.Args[1] == "-check-goarm" {