Skip to content

Commit

Permalink
Rollup merge of #70704 - danielframpton:aarch64-windows-panic-unwind-…
Browse files Browse the repository at this point in the history
…default, r=alexcrichton

Make panic unwind the default for aarch64-*-windows-msvc targets

With the llvm fixes from rust-lang/llvm-project#45 (included as a submodule change) we can enable unwinding by default for these targets.

Fixes #65313

There are still a small number of test failures for which we can open individual issues.

r? @alexcrichton
  • Loading branch information
Centril authored Apr 6, 2020
2 parents eea91c3 + 7941817 commit da87316
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 da87316

Please sign in to comment.