aboutsummaryrefslogtreecommitdiffstats
path: root/sys/syz-extract/linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-02-17 17:25:50 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-02-17 19:02:12 +0100
commit32aa64c5acbc82b6f4f3605ccfdf3b62faf9a094 (patch)
tree0d0ae5e5ee1d0492141ffe84a3e18153ff738f33 /sys/syz-extract/linux.go
parent414c035582c39398ddd927b5e4fdfd7a6f3aefc5 (diff)
sys/syz-extract: run make with -j
Diffstat (limited to 'sys/syz-extract/linux.go')
-rw-r--r--sys/syz-extract/linux.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/syz-extract/linux.go b/sys/syz-extract/linux.go
index 12fe5383d..99cfb44e2 100644
--- a/sys/syz-extract/linux.go
+++ b/sys/syz-extract/linux.go
@@ -6,6 +6,7 @@ package main
import (
"fmt"
"path/filepath"
+ "runtime"
"strings"
"time"
@@ -27,7 +28,8 @@ func (*linux) prepare(sourcedir string, build bool, arches []string) error {
osutil.IsExist(filepath.Join(sourcedir, "init/main.o")) ||
osutil.IsExist(filepath.Join(sourcedir, "include/generated/compile.h")) {
fmt.Printf("make mrproper\n")
- out, err := osutil.RunCmd(time.Hour, sourcedir, "make", "mrproper")
+ out, err := osutil.RunCmd(time.Hour, sourcedir, "make", "mrproper",
+ "-j", fmt.Sprint(runtime.NumCPU()))
if err != nil {
return fmt.Errorf("make mrproper failed: %v\n%s\n", err, out)
}
@@ -52,6 +54,7 @@ func (*linux) prepareArch(arch *Arch) error {
"CROSS_COMPILE=" + target.CCompilerPrefix,
"CFLAGS=" + strings.Join(target.CrossCFlags, " "),
"O=" + buildDir,
+ "-j", fmt.Sprint(runtime.NumCPU()),
}
out, err := osutil.RunCmd(time.Hour, kernelDir, "make", append(makeArgs, "defconfig")...)
if err != nil {