summaryrefslogtreecommitdiff
path: root/scripts/generate_rust_target.rs
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2025-09-28 00:10:34 +0200
committerWolfram Sang <wsa+renesas@sang-engineering.com>2025-09-28 00:10:34 +0200
commitc07b3e60b4d853056f696c449d4d47701dc9f36f (patch)
tree96f9f6b2364d488f1a727365512f24270eb78d72 /scripts/generate_rust_target.rs
parentc149841b069ccc6e480b00e11f35a57b5d88c7bb (diff)
parent217f92d91c9faeb6b78bd6205b3585944cbcb433 (diff)
Merge tag 'i2c-host-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow
i2c-host for v6.18 - Add support for MediaTek MT6878 I2C - Drop support for S3C2410
Diffstat (limited to 'scripts/generate_rust_target.rs')
-rw-r--r--scripts/generate_rust_target.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/generate_rust_target.rs b/scripts/generate_rust_target.rs
index 39c82908ff3a..38b3416bb979 100644
--- a/scripts/generate_rust_target.rs
+++ b/scripts/generate_rust_target.rs
@@ -225,7 +225,11 @@ fn main() {
ts.push("features", features);
ts.push("llvm-target", "x86_64-linux-gnu");
ts.push("supported-sanitizers", ["kcfi", "kernel-address"]);
- ts.push("target-pointer-width", "64");
+ if cfg.rustc_version_atleast(1, 91, 0) {
+ ts.push("target-pointer-width", 64);
+ } else {
+ ts.push("target-pointer-width", "64");
+ }
} else if cfg.has("X86_32") {
// This only works on UML, as i386 otherwise needs regparm support in rustc
if !cfg.has("UML") {
@@ -245,7 +249,11 @@ fn main() {
}
ts.push("features", features);
ts.push("llvm-target", "i386-unknown-linux-gnu");
- ts.push("target-pointer-width", "32");
+ if cfg.rustc_version_atleast(1, 91, 0) {
+ ts.push("target-pointer-width", 32);
+ } else {
+ ts.push("target-pointer-width", "32");
+ }
} else if cfg.has("LOONGARCH") {
panic!("loongarch uses the builtin rustc loongarch64-unknown-none-softfloat target");
} else {