Parallel jobs should default to the number of available, logical CPU cores.
This commit is contained in:
parent
73d1b31466
commit
d9844d3ca7
1 changed files with 2 additions and 1 deletions
3
mk.go
3
mk.go
|
|
@ -2,6 +2,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"runtime"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
@ -311,7 +312,7 @@ func main() {
|
||||||
flag.BoolVar(&dryrun, "n", false, "print commands without actually executing")
|
flag.BoolVar(&dryrun, "n", false, "print commands without actually executing")
|
||||||
flag.BoolVar(&shallowrebuild, "r", false, "force building of just targets")
|
flag.BoolVar(&shallowrebuild, "r", false, "force building of just targets")
|
||||||
flag.BoolVar(&rebuildall, "a", false, "force building of all dependencies")
|
flag.BoolVar(&rebuildall, "a", false, "force building of all dependencies")
|
||||||
flag.IntVar(&subprocsAllowed, "p", 4, "maximum number of jobs to execute in parallel")
|
flag.IntVar(&subprocsAllowed, "p", runtime.NumCPU(), "maximum number of jobs to execute in parallel")
|
||||||
flag.BoolVar(&interactive, "i", false, "prompt before executing rules")
|
flag.BoolVar(&interactive, "i", false, "prompt before executing rules")
|
||||||
flag.BoolVar(&quiet, "q", false, "don't print recipes before executing them")
|
flag.BoolVar(&quiet, "q", false, "don't print recipes before executing them")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue