Skip to content

Commit 12088f5

Browse files
committed
rust: disable stack probes
We do not support function-call stack probes, and LLVM inline asm stack probe is currently broken [1][2]. Switching target's `stack-probes` to "none" allows us to avoid broken codegen and the intrinsic call. We could switch the `stack-probes` property to `inline` if we want once the LLVM codegen issue is resolved. [1]: https://bugs.llvm.org/show_bug.cgi?id=50165 [2]: rust-lang/rust#84667 Signed-off-by: Gary Guo <gary@garyguo.net>
1 parent bfe9ec6 commit 12088f5

File tree

7 files changed

+6
-40
lines changed

7 files changed

+6
-40
lines changed

arch/arm64/rust/target.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,7 @@
2626
"relocation-model": "static",
2727
"relro-level": "full",
2828
"stack-probes": {
29-
"kind": "inline-or-call",
30-
"min-llvm-version-for-inline": [
31-
11,
32-
0,
33-
1
34-
]
29+
"kind": "none"
3530
},
3631
"target-c-int-width": "32",
3732
"target-endian": "little",

arch/riscv/rust/rv32ima.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@
2828
"relocation-model": "static",
2929
"relro-level": "full",
3030
"stack-probes": {
31-
"kind": "inline-or-call",
32-
"min-llvm-version-for-inline": [
33-
11,
34-
0,
35-
1
36-
]
31+
"kind": "none"
3732
},
3833
"target-c-int-width": "32",
3934
"target-endian": "little",

arch/riscv/rust/rv32imac.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@
2828
"relocation-model": "static",
2929
"relro-level": "full",
3030
"stack-probes": {
31-
"kind": "inline-or-call",
32-
"min-llvm-version-for-inline": [
33-
11,
34-
0,
35-
1
36-
]
31+
"kind": "none"
3732
},
3833
"target-c-int-width": "32",
3934
"target-endian": "little",

arch/riscv/rust/rv64ima.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@
2828
"relocation-model": "static",
2929
"relro-level": "full",
3030
"stack-probes": {
31-
"kind": "inline-or-call",
32-
"min-llvm-version-for-inline": [
33-
11,
34-
0,
35-
1
36-
]
31+
"kind": "none"
3732
},
3833
"target-c-int-width": "32",
3934
"target-endian": "little",

arch/riscv/rust/rv64imac.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@
2828
"relocation-model": "static",
2929
"relro-level": "full",
3030
"stack-probes": {
31-
"kind": "inline-or-call",
32-
"min-llvm-version-for-inline": [
33-
11,
34-
0,
35-
1
36-
]
31+
"kind": "none"
3732
},
3833
"target-c-int-width": "32",
3934
"target-endian": "little",

arch/x86/rust/target.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@
2828
"relocation-model": "static",
2929
"relro-level": "full",
3030
"stack-probes": {
31-
"kind": "inline-or-call",
32-
"min-llvm-version-for-inline": [
33-
11,
34-
0,
35-
1
36-
]
31+
"kind": "none"
3732
},
3833
"target-c-int-width": "32",
3934
"target-endian": "little",

rust/compiler_builtins.rs

-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ macro_rules! define_panicking_intrinsics(
4242
}
4343
);
4444

45-
define_panicking_intrinsics!("non-inline stack probes should not be used", {
46-
__rust_probestack,
47-
});
48-
4945
define_panicking_intrinsics!("`f32` should not be used", {
5046
__addsf3,
5147
__addsf3vfp,

0 commit comments

Comments
 (0)