Skip to content

Commit

Permalink
Make panic unwind the default for aarch64-*-windows-msvc targets
Browse files Browse the repository at this point in the history
  • Loading branch information
danielframpton committed Apr 3, 2020
1 parent 34f7f55 commit 7941817
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/libpanic_unwind/lib.rs
Expand Up @@ -47,9 +47,6 @@ cfg_if::cfg_if! {
} else if #[cfg(target_os = "hermit")] {
#[path = "hermit.rs"]
mod real_imp;
} else if #[cfg(all(target_env = "msvc", target_arch = "aarch64"))] {
#[path = "dummy.rs"]
mod real_imp;
} else if #[cfg(target_env = "msvc")] {
#[path = "seh.rs"]
mod real_imp;
Expand Down
2 changes: 1 addition & 1 deletion src/libpanic_unwind/seh.rs
Expand Up @@ -117,7 +117,7 @@ mod imp {
}
}

#[cfg(any(target_arch = "x86_64", target_arch = "arm"))]
#[cfg(not(target_arch = "x86"))]
#[macro_use]
mod imp {
pub type ptr_t = u32;
Expand Down
5 changes: 1 addition & 4 deletions src/librustc_target/spec/aarch64_pc_windows_msvc.rs
@@ -1,14 +1,11 @@
use crate::spec::{LinkerFlavor, PanicStrategy, Target, TargetResult};
use crate::spec::{LinkerFlavor, Target, TargetResult};

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

// FIXME: this shouldn't be panic=abort, it should be panic=unwind
base.panic_strategy = PanicStrategy::Abort;

Ok(Target {
llvm_target: "aarch64-pc-windows-msvc".to_string(),
target_endian: "little".to_string(),
Expand Down
5 changes: 1 addition & 4 deletions src/librustc_target/spec/aarch64_uwp_windows_msvc.rs
@@ -1,13 +1,10 @@
use crate::spec::{LinkerFlavor, PanicStrategy, Target, TargetResult};
use crate::spec::{LinkerFlavor, Target, TargetResult};

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

// FIXME: this shouldn't be panic=abort, it should be panic=unwind
base.panic_strategy = PanicStrategy::Abort;

Ok(Target {
llvm_target: "aarch64-pc-windows-msvc".to_string(),
target_endian: "little".to_string(),
Expand Down

0 comments on commit 7941817

Please sign in to comment.