From 0d144d1a990dd507ca7c595b21a5fa13d22161a0 Mon Sep 17 00:00:00 2001 From: Ramneet Singh Date: Thu, 24 Oct 2024 07:53:54 +0000 Subject: 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. --- CONTRIBUTORS | 3 ++- tools/syz-build/build.go | 3 ++- 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, -- cgit mrf-deployment