diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-09 14:57:07 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-09 14:09:02 +0000 |
| commit | 9ee25c60da3366005e31dedd1574732f63338151 (patch) | |
| tree | b4d182ed0e8f110128b1ae0237db09e4d35b1653 /pkg | |
| parent | 4682573eed1810c6839cd6f4fb2737506e8b3390 (diff) | |
pkg/aflow/action/kernel: keep few more files in build outputs
Keep vmlinux for debug info/addr2line.
Keep compile_commands.json, we need it for codesearch.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/aflow/action/kernel/build.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/aflow/action/kernel/build.go b/pkg/aflow/action/kernel/build.go index 17e9fb242..4da9e9d89 100644 --- a/pkg/aflow/action/kernel/build.go +++ b/pkg/aflow/action/kernel/build.go @@ -44,14 +44,19 @@ func buildKernel(ctx *aflow.Context, args buildArgs) (buildResult, error) { image := filepath.FromSlash(build.LinuxKernelImage(targets.AMD64)) makeArgs := build.LinuxMakeArgs(target, targets.DefaultLLVMCompiler, targets.DefaultLLVMLinker, "ccache", dir, runtime.NumCPU()) - makeArgs = append(makeArgs, path.Base(image), "compile_commands.json") + compileCommnads := "compile_commands.json" + makeArgs = append(makeArgs, path.Base(image), compileCommnads) if _, err := osutil.RunCmd(time.Hour, args.KernelSrc, "make", makeArgs...); err != nil { return err } // Remove main intermediate build files, we don't need them anymore // and they take lots of space. Keep generated source files. keepExt := map[string]bool{"h": true, "c": true, "s": true, "S": true} - keepFiles := map[string]bool{image: true} + keepFiles := map[string]bool{ + image: true, + target.KernelObject: true, + compileCommnads: true, + } return filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if err != nil || d.IsDir() || keepFiles[path] || keepExt[filepath.Ext(d.Name())] { return err |
