From: Miguel Ojeda Date: Mon, 8 Jun 2026 14:14:26 +0000 (+0200) Subject: rust: kbuild: support `skip_clippy` for `rustc_procmacro` X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=be43b5d9c26c1f46a89766ec59feb9dffee4c797;p=thirdparty%2Fkernel%2Flinux.git rust: kbuild: support `skip_clippy` for `rustc_procmacro` Certain vendored crates, like the upcoming `zerocopy-derive`, do not need to be built with Clippy since we `--cap-lints=allow` them anyway. Thus add support to skip Clippy for proc macro crates. Acked-by: Nicolas Schier Link: https://patch.msgid.link/20260608141439.182634-8-ojeda@kernel.org Signed-off-by: Miguel Ojeda --- diff --git a/rust/Makefile b/rust/Makefile index 9b5a3f9dd934..7b1db0d5d423 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -547,10 +547,10 @@ $(obj)/libsyn.rlib: private rustc_target_flags = $(syn-flags) $(obj)/libsyn.rlib: $(src)/syn/lib.rs $(obj)/libquote.rlib FORCE +$(call if_changed_dep,rustc_procmacrolibrary) -quiet_cmd_rustc_procmacro = $(RUSTC_OR_CLIPPY_QUIET) P $@ +quiet_cmd_rustc_procmacro = $(if $(skip_clippy),RUSTC,$(RUSTC_OR_CLIPPY_QUIET)) P $@ cmd_rustc_procmacro = \ $(rustc_target_envs) \ - $(RUSTC_OR_CLIPPY) $(rust_common_flags) $(rustc_target_flags) \ + $(if $(skip_clippy),$(RUSTC),$(RUSTC_OR_CLIPPY)) $(rust_common_flags) $(rustc_target_flags) \ -Clinker-flavor=gcc -Clinker=$(HOSTCC) \ -Clink-args='$(call escsq,$(KBUILD_PROCMACROLDFLAGS))' \ --emit=dep-info=$(depfile) --emit=link=$@ --extern proc_macro \