aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/bisect
diff options
context:
space:
mode:
authorJouni Hogander <jouni.hogander@unikie.com>2020-09-01 16:13:50 +0300
committerDmitry Vyukov <dvyukov@google.com>2020-09-21 11:23:04 +0200
commitbbb921d248befbb1bf3970cc8d680403f255de97 (patch)
treec3ef61c8727b2548f1fb4e80da9e3b9fe7a58b82 /pkg/bisect
parent5e8f0f25faceb9346ebfb1a31d49fb4cb0b76507 (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 'pkg/bisect')
-rw-r--r--pkg/bisect/bisect.go3
-rw-r--r--pkg/bisect/bisect_test.go2
2 files changed, 3 insertions, 2 deletions
diff --git a/pkg/bisect/bisect.go b/pkg/bisect/bisect.go
index cf6bae5bc..75b6450d8 100644
--- a/pkg/bisect/bisect.go
+++ b/pkg/bisect/bisect.go
@@ -22,6 +22,7 @@ type Config struct {
Trace io.Writer
Fix bool
BinDir string
+ Ccache string
DebugDir string
Timeout time.Duration
Kernel KernelConfig
@@ -448,7 +449,7 @@ func (env *env) build() (*vcs.Commit, string, error) {
return nil, "", fmt.Errorf("kernel clean failed: %v", err)
}
kern := &env.cfg.Kernel
- _, kernelSign, err := env.inst.BuildKernel(bisectEnv.Compiler, kern.Userspace,
+ _, kernelSign, err := env.inst.BuildKernel(bisectEnv.Compiler, env.cfg.Ccache, kern.Userspace,
kern.Cmdline, kern.Sysctl, bisectEnv.KernelConfig)
if kernelSign != "" {
env.log("kernel signature: %v", kernelSign)
diff --git a/pkg/bisect/bisect_test.go b/pkg/bisect/bisect_test.go
index e60da3aed..ee730b724 100644
--- a/pkg/bisect/bisect_test.go
+++ b/pkg/bisect/bisect_test.go
@@ -32,7 +32,7 @@ func (env *testEnv) BuildSyzkaller(repo, commit string) error {
return nil
}
-func (env *testEnv) BuildKernel(compilerBin, userspaceDir, cmdlineFile, sysctlFile string,
+func (env *testEnv) BuildKernel(compilerBin, cCache, userspaceDir, cmdlineFile, sysctlFile string,
kernelConfig []byte) (string, string, error) {
commit := env.headCommit()
configHash := hash.String(kernelConfig)