Skip to content

Commit 066258d

Browse files
committed
stack unwinding is not yet supported for x86_64-unknown-l4re-uclibc
For now, just abort on panics.
1 parent bf6770c commit 066258d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
use crate::spec::Target;
1+
use crate::spec::{PanicStrategy, Target};
22

33
pub fn target() -> Target {
44
let mut base = super::l4re_base::opts();
55
base.cpu = "x86-64".to_string();
66
base.max_atomic_width = Some(64);
77
base.crt_static_default = true;
8+
base.panic_strategy = PanicStrategy::Abort;
89

910
Target {
1011
llvm_target: "x86_64-unknown-l4re-uclibc".to_string(),

library/panic_unwind/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ cfg_if::cfg_if! {
4040
} else if #[cfg(target_os = "hermit")] {
4141
#[path = "hermit.rs"]
4242
mod real_imp;
43+
} else if #[cfg(target_os = "l4re")] {
44+
// L4Re is unix family but does not yet support unwinding.
45+
#[path = "dummy.rs"]
46+
mod real_imp;
4347
} else if #[cfg(target_env = "msvc")] {
4448
#[path = "seh.rs"]
4549
mod real_imp;

0 commit comments

Comments
 (0)