Skip to content

Commit 5c41fce

Browse files
committed
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.
2 parents bacb5c5 + 01059b9 commit 5c41fce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: src/libunwind/libunwind.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ extern "C" {
9393
}
9494

9595
cfg_if! {
96-
if #[cfg(not(any(all(target_os = "android", target_arch = "arm"),
97-
all(target_os = "linux", target_arch = "arm"))))] {
96+
if #[cfg(all(any(target_os = "ios", not(target_arch = "arm"))))] {
9897
// Not ARM EHABI
9998
#[repr(C)]
10099
#[derive(Copy, Clone, PartialEq)]

0 commit comments

Comments
 (0)