diff options
| author | Florent Revest <revest@chromium.org> | 2024-10-02 16:02:12 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-10-14 19:43:42 +0000 |
| commit | 484e362fcff09b8b74162eefd0c3bfd67e829d94 (patch) | |
| tree | 7db4c1f87a6c37073084a6b806978495297f6d25 /pkg/build/build.go | |
| parent | 2e5c6a5c1c62461b69c6f50a123885b9910fce04 (diff) | |
pkg/build: use the build environment in clean() calls
This unifies the build() and clean() interfaces such that if a custom
compiler or make binary is provided in the manager or bisection config,
they can be taken into account by the clean() interface.
Diffstat (limited to 'pkg/build/build.go')
| -rw-r--r-- | pkg/build/build.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/build/build.go b/pkg/build/build.go index 764cc1ed5..b84adb20b 100644 --- a/pkg/build/build.go +++ b/pkg/build/build.go @@ -23,7 +23,7 @@ import ( "github.com/google/syzkaller/sys/targets" ) -// Params is input arguments for the Image function. +// Params is input arguments for the Image and Clean functions. type Params struct { TargetOS string TargetArch string @@ -113,12 +113,12 @@ func Image(params Params) (details ImageDetails, err error) { return } -func Clean(targetOS, targetArch, vmType, kernelDir string) error { - builder, err := getBuilder(targetOS, targetArch, vmType) +func Clean(params Params) error { + builder, err := getBuilder(params.TargetOS, params.TargetArch, params.VMType) if err != nil { return err } - return builder.clean(kernelDir, targetArch) + return builder.clean(params) } type KernelError struct { @@ -146,7 +146,7 @@ func (e InfraError) Error() string { type builder interface { build(params Params) (ImageDetails, error) - clean(kernelDir, targetArch string) error + clean(params Params) error } func getBuilder(targetOS, targetArch, vmType string) (builder, error) { |
