From: Miguel Ojeda Date: Mon, 24 Nov 2025 15:18:17 +0000 (+0100) Subject: rust: kbuild: support using libraries in `rustc_procmacro` X-Git-Tag: v6.19-rc1~175^2^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c46b34f1d484c11c2a0cbd663168c2213175ca5c;p=thirdparty%2Fkernel%2Flinux.git rust: kbuild: support using libraries in `rustc_procmacro` Proc macros such as `macros` and `pin-init` will need the ability to use libraries such as `syn` (added later) in the `rustc_procmacro` command. Thus add the support for it. Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Tested-by: Gary Guo Tested-by: Jesung Yang Link: https://patch.msgid.link/20251124151837.2184382-6-ojeda@kernel.org Signed-off-by: Miguel Ojeda --- diff --git a/rust/Makefile b/rust/Makefile index 6fdab341fc48b..0288ca8d270cf 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -437,7 +437,7 @@ quiet_cmd_rustc_procmacro = $(RUSTC_OR_CLIPPY_QUIET) P $@ -Clinker-flavor=gcc -Clinker=$(HOSTCC) \ -Clink-args='$(call escsq,$(KBUILD_PROCMACROLDFLAGS))' \ --emit=dep-info=$(depfile) --emit=link=$@ --extern proc_macro \ - --crate-type proc-macro \ + --crate-type proc-macro -L$(objtree)/$(obj) \ --crate-name $(patsubst lib%.$(libmacros_extension),%,$(notdir $@)) \ @$(objtree)/include/generated/rustc_cfg $<