summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf
diff options
context:
space:
mode:
authorJakub Sitnicki <jakub@cloudflare.com>2019-10-20 13:23:44 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-10-20 18:21:21 -0700
commitab81e203bc0d4a4542bca2498535f8761a3cfd92 (patch)
tree026ff65fd5b453ef4e73a4281671ac45ae1d0da1 /tools/lib/bpf
parent54b8625cd940b6baace0bd9b1cf26b2de68ba307 (diff)
downloadtalos-op-linux-ab81e203bc0d4a4542bca2498535f8761a3cfd92.tar.gz
talos-op-linux-ab81e203bc0d4a4542bca2498535f8761a3cfd92.zip
scripts/bpf: Print an error when known types list needs updating
Don't generate a broken bpf_helper_defs.h header if the helper script needs updating because it doesn't recognize a newly added type. Instead print an error that explains why the build is failing, clean up the partially generated header and stop. v1->v2: - Switched from temporary file to .DELETE_ON_ERROR. Fixes: 456a513bb5d4 ("scripts/bpf: Emit an #error directive known types list needs updating") Suggested-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20191020112344.19395-1-jakub@cloudflare.com
Diffstat (limited to 'tools/lib/bpf')
-rw-r--r--tools/lib/bpf/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 75b538577c17..54ff80faa8df 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -286,3 +286,6 @@ tags:
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable so we can use it in if_changed and friends.
.PHONY: $(PHONY)
+
+# Delete partially updated (corrupted) files on error
+.DELETE_ON_ERROR:
OpenPOWER on IntegriCloud