Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: kbuild: add proc macro library support

Add the proc macro library rule that produces `.rlib` files to be used
by proc macros such as the `macros` crate.

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-4-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

+11
+1
.gitignore
··· 41 41 *.o.* 42 42 *.patch 43 43 *.pyc 44 + *.rlib 44 45 *.rmeta 45 46 *.rpm 46 47 *.rsi
+10
rust/Makefile
··· 421 421 $(obj)/exports_kernel_generated.h: $(obj)/kernel.o FORCE 422 422 $(call if_changed,exports) 423 423 424 + quiet_cmd_rustc_procmacrolibrary = $(RUSTC_OR_CLIPPY_QUIET) PL $@ 425 + cmd_rustc_procmacrolibrary = \ 426 + $(if $(skip_clippy),$(RUSTC),$(RUSTC_OR_CLIPPY)) \ 427 + $(filter-out $(skip_flags),$(rust_common_flags) $(rustc_target_flags)) \ 428 + --emit=dep-info,link --crate-type rlib -O \ 429 + --out-dir $(objtree)/$(obj) -L$(objtree)/$(obj) \ 430 + --crate-name $(patsubst lib%.rlib,%,$(notdir $@)) $<; \ 431 + mv $(objtree)/$(obj)/$(patsubst lib%.rlib,%,$(notdir $@)).d $(depfile); \ 432 + sed -i '/^\#/d' $(depfile) 433 + 424 434 quiet_cmd_rustc_procmacro = $(RUSTC_OR_CLIPPY_QUIET) P $@ 425 435 cmd_rustc_procmacro = \ 426 436 $(RUSTC_OR_CLIPPY) $(rust_common_flags) $(rustc_target_flags) \