summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-27 00:28:34 +0000
committerbors <bors@rust-lang.org>2018-01-27 00:28:34 +0000
commit5c41fcec4cd6e76180edb088a48914aa71612e5d (patch)
treead4ed984a3635c0695fce867c391afb4f4da9d26
parentbacb5c58dfdde7c35e99b2b0d8171238cc33cf6c (diff)
parent01059b9454db83c12d0215b8bf0721d6fd69ff93 (diff)
downloadrust-5c41fcec4cd6e76180edb088a48914aa71612e5d.tar.gz
Auto merge of #47571 - FenrirWolf:libunwind, r=alexcrichton
Match libunwind's EABI selection with libpanic_unwind Currently, the `libunwind` crate will only select the ARM EABI if it is compiling for ARM/Linux or Android targets. `libpanic_unwind`, however, will choose the ARM EABI if the target arch is ARM and the OS is not iOS. This means that if one tries to enable unwinding for a non-standard ARM target (such as implementing a custom stdlib via Xargo, for example), then the two crates can potentially disagree about which EABI is being targeted. This PR makes `libunwind` use the [same logic](https://github.com/rust-lang/rust/blob/master/src/libpanic_unwind/gcc.rs#L139-L146) as `libpanic_unwind` when choosing the EABI. I noticed there are a few comments about certain functions only differing on Android or ARM/Linux, but I *think* that those differences apply to the ARM EABI in general. Let me know if I'm wrong about that.
-rw-r--r--src/libunwind/libunwind.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs
index e22f6702672..e6fff7963f7 100644
--- a/src/libunwind/libunwind.rs
+++ b/src/libunwind/libunwind.rs
@@ -93,8 +93,7 @@ extern "C" {
}
cfg_if! {
-if #[cfg(not(any(all(target_os = "android", target_arch = "arm"),
- all(target_os = "linux", target_arch = "arm"))))] {
+if #[cfg(all(any(target_os = "ios", not(target_arch = "arm"))))] {
// Not ARM EHABI
#[repr(C)]
#[derive(Copy, Clone, PartialEq)]