Skip to content

Commit 3ac2e20

Browse files
anakryikoAlexei Starovoitov
authored andcommitted
selftests/bpf: BPF object files should depend only on libbpf headers
There is no need to re-build BPF object files if any of the sources of libbpf change. So record more precise dependency only on libbpf/bpf_*.h headers. This eliminates unnecessary re-builds. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200820231250.1293069-2-andriin@fb.com
1 parent 3c4a594 commit 3ac2e20

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/testing/selftests/bpf/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ $(TRUNNER_BPF_OBJS): $(TRUNNER_OUTPUT)/%.o: \
316316
$(TRUNNER_BPF_PROGS_DIR)/%.c \
317317
$(TRUNNER_BPF_PROGS_DIR)/*.h \
318318
$$(INCLUDE_DIR)/vmlinux.h \
319-
$$(BPFOBJ) | $(TRUNNER_OUTPUT)
319+
$(wildcard $(BPFDIR)/bpf_*.h) | $(TRUNNER_OUTPUT)
320320
$$(call $(TRUNNER_BPF_BUILD_RULE),$$<,$$@, \
321321
$(TRUNNER_BPF_CFLAGS), \
322322
$(TRUNNER_BPF_LDFLAGS))

0 commit comments

Comments
 (0)