summaryrefslogtreecommitdiff
path: root/scripts/generate_rust_target.rs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-15 09:18:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-15 09:18:40 +0300
commita4d43c1f17b9f143af5868285c513c866e9cf67b (patch)
tree36117fb220ae2ff5cf1c11fc6ffa705acdc34833 /scripts/generate_rust_target.rs
parent82432bbfb9e83b7e81d04660fe129b99a29b2ac2 (diff)
parentf83ec76bf285bea5727f478a68b894f5543ca76e (diff)
downloadlinux-a4d43c1f17b9f143af5868285c513c866e9cf67b.tar.xz
Merge 6.17-rc6 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 {