aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance/instance.go
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/instance/instance.go
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/instance/instance.go')
-rw-r--r--pkg/instance/instance.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go
index 201c07cf8..b5cbd3bd2 100644
--- a/pkg/instance/instance.go
+++ b/pkg/instance/instance.go
@@ -29,7 +29,7 @@ import (
type Env interface {
BuildSyzkaller(string, string) error
- BuildKernel(string, string, string, string, []byte) (string, string, error)
+ BuildKernel(string, string, string, string, string, []byte) (string, string, error)
Test(numVMs int, reproSyz, reproOpts, reproC []byte) ([]error, error)
}
@@ -94,7 +94,7 @@ func (env *env) BuildSyzkaller(repo, commit string) error {
return nil
}
-func (env *env) BuildKernel(compilerBin, userspaceDir, cmdlineFile, sysctlFile string, kernelConfig []byte) (
+func (env *env) BuildKernel(compilerBin, ccacheBin, userspaceDir, cmdlineFile, sysctlFile string, kernelConfig []byte) (
string, string, error) {
imageDir := filepath.Join(env.cfg.Workdir, "image")
params := &build.Params{
@@ -104,6 +104,7 @@ func (env *env) BuildKernel(compilerBin, userspaceDir, cmdlineFile, sysctlFile s
KernelDir: env.cfg.KernelSrc,
OutputDir: imageDir,
Compiler: compilerBin,
+ Ccache: ccacheBin,
UserspaceDir: userspaceDir,
CmdlineFile: cmdlineFile,
SysctlFile: sysctlFile,