aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamneet Singh <ramneet2001@gmail.com>2024-10-24 07:53:54 +0000
committerAleksandr Nogikh <nogikh@google.com>2024-10-24 09:09:31 +0000
commit0d144d1a990dd507ca7c595b21a5fa13d22161a0 (patch)
tree98bb26e341da1842b437beba9ac54bbdbb5c5ea3
parent092bf4ab6d1618531dc1d9d9c3231d0e7b6bf6d8 (diff)
tools/syz-build: expose ccache as cli flag
While Ccache is a field in build.Params, a user of syz-build does not have the option to set it via the CLI. This PR exposes a CLI flag for ccache and passes it to build.Params.
-rw-r--r--CONTRIBUTORS3
-rw-r--r--tools/syz-build/build.go3
2 files changed, 4 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index a20c7115e..88b58f7a3 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -133,4 +133,5 @@ Simone Weiß
Amazon
Bjoern Doebel
Viacheslav Sablin
-Davide Ornaghi \ No newline at end of file
+Davide Ornaghi
+Ramneet Singh
diff --git a/tools/syz-build/build.go b/tools/syz-build/build.go
index 49398bc68..7ae1ed2c2 100644
--- a/tools/syz-build/build.go
+++ b/tools/syz-build/build.go
@@ -23,6 +23,7 @@ var (
flagMake = flag.String("make", "", "non-default make")
flagCompiler = flag.String("compiler", "", "non-default compiler")
flagLinker = flag.String("linker", "", "non-default linker")
+ flagCcache = flag.String("ccache", "", "ccache executable")
flagKernelConfig = flag.String("config", "", "kernel config file")
flagKernelSysctl = flag.String("sysctl", "", "kernel sysctl file")
flagKernelCmdline = flag.String("cmdline", "", "kernel cmdline file")
@@ -57,7 +58,7 @@ func main() {
Make: *flagMake,
Compiler: *flagCompiler,
Linker: *flagLinker,
- Ccache: "",
+ Ccache: *flagCcache,
UserspaceDir: *flagUserspace,
CmdlineFile: *flagKernelCmdline,
SysctlFile: *flagKernelSysctl,