From bbb921d248befbb1bf3970cc8d680403f255de97 Mon Sep 17 00:00:00 2001 From: Jouni Hogander Date: Tue, 1 Sep 2020 16:13:50 +0300 Subject: pkg/bisect: add ccache option Add option to use ccache in kernel builds. Signed-off-by: Jouni Hogander --- syz-ci/jobs.go | 5 +++-- syz-ci/manager.go | 1 + syz-ci/syz-ci.go | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'syz-ci') diff --git a/syz-ci/jobs.go b/syz-ci/jobs.go index faa35c439..3322609dd 100644 --- a/syz-ci/jobs.go +++ b/syz-ci/jobs.go @@ -405,6 +405,7 @@ func (jp *JobProcessor) bisect(job *Job, mgrcfg *mgrconfig.Config) error { Timeout: 8 * time.Hour, Fix: req.Type == dashapi.JobBisectFix, BinDir: jp.cfg.BisectBinDir, + Ccache: jp.cfg.Ccache, Kernel: bisect.KernelConfig{ Repo: mgr.mgrcfg.Repo, Branch: mgr.mgrcfg.Branch, @@ -527,8 +528,8 @@ func (jp *JobProcessor) testPatch(job *Job, mgrcfg *mgrconfig.Config) error { } log.Logf(0, "job: building kernel...") - kernelConfig, _, err := env.BuildKernel(mgr.mgrcfg.Compiler, mgr.mgrcfg.Userspace, mgr.mgrcfg.KernelCmdline, - mgr.mgrcfg.KernelSysctl, req.KernelConfig) + kernelConfig, _, err := env.BuildKernel(mgr.mgrcfg.Compiler, mgr.mgrcfg.Ccache, mgr.mgrcfg.Userspace, + mgr.mgrcfg.KernelCmdline, mgr.mgrcfg.KernelSysctl, req.KernelConfig) if err != nil { return err } diff --git a/syz-ci/manager.go b/syz-ci/manager.go index 99a2ec44a..ce9b04518 100644 --- a/syz-ci/manager.go +++ b/syz-ci/manager.go @@ -301,6 +301,7 @@ func (mgr *Manager) build(kernelCommit *vcs.Commit) error { KernelDir: mgr.kernelDir, OutputDir: tmpDir, Compiler: mgr.mgrcfg.Compiler, + Ccache: mgr.mgrcfg.Ccache, UserspaceDir: mgr.mgrcfg.Userspace, CmdlineFile: mgr.mgrcfg.KernelCmdline, SysctlFile: mgr.mgrcfg.KernelSysctl, diff --git a/syz-ci/syz-ci.go b/syz-ci/syz-ci.go index faa51f4fc..b696fc8e0 100644 --- a/syz-ci/syz-ci.go +++ b/syz-ci/syz-ci.go @@ -93,6 +93,7 @@ type Config struct { // GCS path to upload coverage reports from managers (optional). CoverUploadPath string `json:"cover_upload_path"` BisectBinDir string `json:"bisect_bin_dir"` + Ccache string `json:"ccache"` Managers []*ManagerConfig `json:"managers"` } @@ -106,6 +107,7 @@ type ManagerConfig struct { RepoAlias string `json:"repo_alias"` Branch string `json:"branch"` // Defaults to "master". Compiler string `json:"compiler"` + Ccache string `json:"ccache"` Userspace string `json:"userspace"` KernelConfig string `json:"kernel_config"` // Baseline config for bisection, see pkg/bisect.KernelConfig.BaselineConfig. -- cgit mrf-deployment