Skip to content

Commit 50d3a3f

Browse files
olsajirianakryiko
authored andcommitted
kbuild: Add resolve_btfids clean to root clean target
The resolve_btfids tool is used during the kernel build, so we should clean it on kernel's make clean. Invoking the the resolve_btfids clean as part of root 'make clean'. Signed-off-by: Jiri Olsa <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Song Liu <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 7962cb9 commit 50d3a3f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,11 @@ ifdef CONFIG_STACK_VALIDATION
10861086
endif
10871087
endif
10881088

1089+
PHONY += resolve_btfids_clean
1090+
1091+
resolve_btfids_clean:
1092+
$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(abspath $(objtree))/tools/bpf/resolve_btfids clean
1093+
10891094
ifdef CONFIG_BPF
10901095
ifdef CONFIG_DEBUG_INFO_BTF
10911096
ifeq ($(has_libelf),1)
@@ -1495,7 +1500,7 @@ vmlinuxclean:
14951500
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
14961501
$(Q)$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) clean)
14971502

1498-
clean: archclean vmlinuxclean
1503+
clean: archclean vmlinuxclean resolve_btfids_clean
14991504

15001505
# mrproper - Delete all generated files, including .config
15011506
#

0 commit comments

Comments
 (0)