aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
authorMiguel Ojeda <ojeda@kernel.org>2026-06-08 16:14:26 +0200
committerMiguel Ojeda <ojeda@kernel.org>2026-06-09 04:13:22 +0200
commitbe43b5d9c26c1f46a89766ec59feb9dffee4c797 (patch)
treeaeefb4064df51a933653f1382987542a7b2748ce /rust
parent0ba60f71440fc5ff73a4ce650c2ea96c3942112b (diff)
downloadath-be43b5d9c26c1f46a89766ec59feb9dffee4c797.tar.gz
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 <nsc@kernel.org> Link: https://patch.msgid.link/20260608141439.182634-8-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust')
-rw-r--r--rust/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/Makefile b/rust/Makefile
index 9b5a3f9dd934e..7b1db0d5d4233 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 \