[PATCH v2 32/33] rust: kbuild: support global per-version flags

Tamir Duberstein tamird at kernel.org
Mon Apr 6 07:28:57 PDT 2026


On Mon, 06 Apr 2026 01:53:08 +0200, Miguel Ojeda <ojeda at kernel.org> wrote:
> Sometimes it is useful to gate global Rust flags per compiler version.
> For instance, we may want to disable a lint that has false positives in
> a single version [1].
> 
> We already had helpers like `rustc-min-version` for that, which we use
> elsewhere, but we cannot currently use them for `rust_common_flags`,
> which contains the global flags for all Rust code (kernel and host),
> because `rustc-min-version` depends on `CONFIG_RUSTC_VERSION`, which
> does not exist when `rust_common_flags` is defined.
> 
> [...]

Reviewed-by: Tamir Duberstein <tamird at kernel.org>

-- 
Tamir Duberstein <tamird at kernel.org>



More information about the linux-riscv mailing list