Skip to content

Commit cfa1648

Browse files
FlorentRevestdvyukov
authored andcommitted
pkg/aflow/action/kernel/build: fix a typo
While we are at it, let's also make it a constant to make the intent clearer.
1 parent ed8972c commit cfa1648

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/aflow/action/kernel/build.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ func buildKernel(ctx *aflow.Context, args buildArgs) (buildResult, error) {
4545
image := filepath.FromSlash(build.LinuxKernelImage(targets.AMD64))
4646
makeArgs := build.LinuxMakeArgs(target, targets.DefaultLLVMCompiler, targets.DefaultLLVMLinker,
4747
"ccache", dir, runtime.NumCPU())
48-
compileCommnads := "compile_commands.json"
49-
makeArgs = append(makeArgs, "-s", path.Base(image), compileCommnads)
48+
const compileCommands = "compile_commands.json"
49+
makeArgs = append(makeArgs, "-s", path.Base(image), compileCommands)
5050
if out, err := osutil.RunCmd(time.Hour, args.KernelSrc, "make", makeArgs...); err != nil {
5151
return aflow.FlowError(fmt.Errorf("make failed: %w\n%s", err, out))
5252
}
@@ -55,7 +55,7 @@ func buildKernel(ctx *aflow.Context, args buildArgs) (buildResult, error) {
5555
keepFiles := map[string]bool{
5656
image: true,
5757
target.KernelObject: true,
58-
compileCommnads: true,
58+
compileCommands: true,
5959
}
6060
return filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
6161
if err != nil {

0 commit comments

Comments
 (0)