rust: support Rust >= 1.91.0 target spec
authorMiguel Ojeda <ojeda@kernel.org>
Fri, 29 Aug 2025 19:55:25 +0000 (21:55 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Sun, 31 Aug 2025 21:34:34 +0000 (23:34 +0200)
commit8851e27d2cb947ea8bbbe8e812068f7bf5cbd00b
treecb541b12e6503ac69c2c0d20bd423e721a11507a
parentc09461a0d24fba8a847a37a381626141da22d8ee
rust: support Rust >= 1.91.0 target spec

Starting with Rust 1.91.0 (expected 2025-10-30), the target spec format
has changed the type of the `target-pointer-width` key from string
to integer [1].

Thus conditionally use one or the other depending on the version.

Cc: Waffle Maybe <waffle.lapkin@gmail.com>
Link: https://github.com/rust-lang/rust/pull/144443
Link: https://lore.kernel.org/r/20250829195525.721664-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
scripts/generate_rust_target.rs