Skip to content

Commit 7941817

Browse files
Make panic unwind the default for aarch64-*-windows-msvc targets
1 parent 34f7f55 commit 7941817

File tree

5 files changed

+4
-13
lines changed

5 files changed

+4
-13
lines changed

src/libpanic_unwind/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ cfg_if::cfg_if! {
4747
} else if #[cfg(target_os = "hermit")] {
4848
#[path = "hermit.rs"]
4949
mod real_imp;
50-
} else if #[cfg(all(target_env = "msvc", target_arch = "aarch64"))] {
51-
#[path = "dummy.rs"]
52-
mod real_imp;
5350
} else if #[cfg(target_env = "msvc")] {
5451
#[path = "seh.rs"]
5552
mod real_imp;

src/libpanic_unwind/seh.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ mod imp {
117117
}
118118
}
119119

120-
#[cfg(any(target_arch = "x86_64", target_arch = "arm"))]
120+
#[cfg(not(target_arch = "x86"))]
121121
#[macro_use]
122122
mod imp {
123123
pub type ptr_t = u32;

src/librustc_target/spec/aarch64_pc_windows_msvc.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
use crate::spec::{LinkerFlavor, PanicStrategy, Target, TargetResult};
1+
use crate::spec::{LinkerFlavor, Target, TargetResult};
22

33
pub fn target() -> TargetResult {
44
let mut base = super::windows_msvc_base::opts();
55
base.max_atomic_width = Some(64);
66
base.has_elf_tls = true;
77
base.features = "+neon,+fp-armv8".to_string();
88

9-
// FIXME: this shouldn't be panic=abort, it should be panic=unwind
10-
base.panic_strategy = PanicStrategy::Abort;
11-
129
Ok(Target {
1310
llvm_target: "aarch64-pc-windows-msvc".to_string(),
1411
target_endian: "little".to_string(),

src/librustc_target/spec/aarch64_uwp_windows_msvc.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
use crate::spec::{LinkerFlavor, PanicStrategy, Target, TargetResult};
1+
use crate::spec::{LinkerFlavor, Target, TargetResult};
22

33
pub fn target() -> TargetResult {
44
let mut base = super::windows_uwp_msvc_base::opts();
55
base.max_atomic_width = Some(64);
66
base.has_elf_tls = true;
77

8-
// FIXME: this shouldn't be panic=abort, it should be panic=unwind
9-
base.panic_strategy = PanicStrategy::Abort;
10-
118
Ok(Target {
129
llvm_target: "aarch64-pc-windows-msvc".to_string(),
1310
target_endian: "little".to_string(),

0 commit comments

Comments
 (0)