Skip to content

Commit c46b34f

Browse files
committed
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 <aliceryhl@google.com> Reviewed-by: Gary Guo <gary@garyguo.net> Tested-by: Gary Guo <gary@garyguo.net> Tested-by: Jesung Yang <y.j3ms.n@gmail.com> Link: https://patch.msgid.link/20251124151837.2184382-6-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent d4e7307 commit c46b34f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ quiet_cmd_rustc_procmacro = $(RUSTC_OR_CLIPPY_QUIET) P $@
437437
-Clinker-flavor=gcc -Clinker=$(HOSTCC) \
438438
-Clink-args='$(call escsq,$(KBUILD_PROCMACROLDFLAGS))' \
439439
--emit=dep-info=$(depfile) --emit=link=$@ --extern proc_macro \
440-
--crate-type proc-macro \
440+
--crate-type proc-macro -L$(objtree)/$(obj) \
441441
--crate-name $(patsubst lib%.$(libmacros_extension),%,$(notdir $@)) \
442442
@$(objtree)/include/generated/rustc_cfg $<
443443

0 commit comments

Comments
 (0)