]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rust: kbuild: expand rusttest target for macros
authorEthan D. Twardy <ethan.twardy@gmail.com>
Fri, 7 Mar 2025 22:50:03 +0000 (23:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:01:48 +0000 (13:01 +0100)
commit113720033d16ffc31a88f86a33793f884d3c48ad
treed9c97a5ebc507be08c64423219bb766a40840f9b
parent2f6b7da3f620e96c1ca679a810414b084a908c5f
rust: kbuild: expand rusttest target for macros

commit b2c261fa8629dff2bd1143fa790797a773ace102 upstream.

Previously, the rusttest target for the macros crate did not specify
the dependencies necessary to run the rustdoc tests. These tests rely on
the kernel crate, so add the dependencies.

Signed-off-by: Ethan D. Twardy <ethan.twardy@gmail.com>
Link: https://github.com/Rust-for-Linux/linux/issues/1076
Link: https://lore.kernel.org/r/20240704145607.17732-2-ethan.twardy@gmail.com
[ Rebased (`alloc` is gone nowadays, sysroot handling is simpler) and
  simplified (reused `rustdoc_test` rule instead of adding a new one,
  no need for `rustdoc-compiler_builtins`, removed unneeded `macros`
  explicit path). Made `vtable` example fail (avoiding to increase
  the complexity in the `rusttest` target). Removed unstable
  `-Zproc-macro-backtrace` option. Reworded accordingly. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rust/Makefile
rust/macros/lib.rs