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

From: Tamir Duberstein

Date: Mon Apr 06 2026 - 10:36:57 EST


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

--
Tamir Duberstein <tamird@xxxxxxxxxx>