diff options
| author | Jouni Hogander <jouni.hogander@unikie.com> | 2020-09-01 16:13:50 +0300 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-09-21 11:23:04 +0200 |
| commit | bbb921d248befbb1bf3970cc8d680403f255de97 (patch) | |
| tree | c3ef61c8727b2548f1fb4e80da9e3b9fe7a58b82 /syz-ci | |
| parent | 5e8f0f25faceb9346ebfb1a31d49fb4cb0b76507 (diff) | |
pkg/bisect: add ccache option
Add option to use ccache in kernel builds.
Signed-off-by: Jouni Hogander <jouni.hoegander@partner.bmw.de>
Diffstat (limited to 'syz-ci')
| -rw-r--r-- | syz-ci/jobs.go | 5 | ||||
| -rw-r--r-- | syz-ci/manager.go | 1 | ||||
| -rw-r--r-- | syz-ci/syz-ci.go | 2 |
3 files changed, 6 insertions, 2 deletions
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. |
