Enable parallelCompile since golang is now >= 1.9
Test: m nothing Change-Id: I38cdd83ca9b17263155433abb65fb4f97b5ec70b
This commit is contained in:
parent
4cff07db25
commit
ad7bcc7b50
1 changed files with 8 additions and 15 deletions
|
@ -16,7 +16,6 @@ package bootstrap
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"go/build"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
@ -33,9 +32,6 @@ var (
|
|||
pluginGenSrcCmd = pctx.StaticVariable("pluginGenSrcCmd", filepath.Join("$ToolDir", "loadplugins"))
|
||||
|
||||
parallelCompile = pctx.StaticVariable("parallelCompile", func() string {
|
||||
// Parallel compilation is only supported on >= go1.9
|
||||
for _, r := range build.Default.ReleaseTags {
|
||||
if r == "go1.9" {
|
||||
numCpu := runtime.NumCPU()
|
||||
// This will cause us to recompile all go programs if the
|
||||
// number of cpus changes. We don't get a lot of benefit from
|
||||
|
@ -45,9 +41,6 @@ var (
|
|||
numCpu = 8
|
||||
}
|
||||
return fmt.Sprintf("-c %d", numCpu)
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}())
|
||||
|
||||
compile = pctx.StaticRule("compile",
|
||||
|
|
Loading…
Reference in a new issue