linux/rust/macros
Miguel Ojeda aeb0e24abb kbuild: rust: replace proc macros dependency on core.o with the version text
With the `RUSTC_VERSION_TEXT` rebuild support in place, now proc macros
can depend on that instead of `core.o`.

This means that both the `core` and `macros` crates can be built in
parallel, and that touching `core.o` does not trigger a rebuild of the
proc macros.

This could be accomplished using the same approach as for `core`
(i.e. depending directly on `include/config/RUSTC_VERSION_TEXT`). However,
that is considered an implementation detail [1], and thus it is best
to avoid it. Instead, let fixdep find a string that we explicitly
write down in the source code for this purpose (like it is done for
`include/linux/compiler-version.h`), which we can easily do (unlike for
`core`) since this is our own source code.

Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/rust-for-linux/CAK7LNAQBG0nDupXSgAAk-6nOqeqGVkr3H1RjYaqRJ1OxmLm6xA@mail.gmail.com/ [1]
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20240902165535.1101978-5-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-09-05 22:44:51 +02:00
..
concat_idents.rs rust: macros: add concat_idents! proc macro 2022-12-04 01:59:04 +01:00
helpers.rs rust: macros: allow generic parameter default values in #[pin_data] 2024-04-07 22:03:42 +02:00
lib.rs kbuild: rust: replace proc macros dependency on core.o with the version text 2024-09-05 22:44:51 +02:00
module.rs rust: module: add static pointer to {init,cleanup}_module() 2024-08-18 23:34:37 +02:00
paste.rs rust: macros: update 'paste!' macro to accept string literals 2023-12-14 20:14:01 +01:00
pin_data.rs rust: macros: allow generic parameter default values in #[pin_data] 2024-04-07 22:03:42 +02:00
pinned_drop.rs rust: init: add PinnedDrop trait and macros 2023-04-12 18:41:05 +02:00
quote.rs rust: add derive macro for Zeroable 2023-08-21 14:31:48 +02:00
vtable.rs rust: macros: vtable: fix HAS_* redefinition (gen_const_name) 2023-08-09 21:15:07 +02:00
zeroable.rs rust: macros: add decl_generics to parse_generics() 2024-04-07 22:03:42 +02:00