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

Tamir Duberstein
2026-04-06T14:29:24Z

On Mon, 06 Apr 2026 01:53:08 +0200, Miguel Ojeda <ojeda@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@kernel.org>

--
Tamir Duberstein <tamird@kernel.org>