Skip to content

Commit

Permalink
Remove obsolete support for linking unwinder on Android
Browse files Browse the repository at this point in the history
Linking libgcc is no longer supported (see rust-lang#103673), so remove the
related link attributes and the check in unwind's build.rs. The check
was the last remaining significant piece of logic in build.rs, so
remove build.rs as well.
  • Loading branch information
pcc committed Nov 3, 2023
1 parent 722b3ee commit a9e1852
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
3 changes: 0 additions & 3 deletions library/unwind/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ libc = { version = "0.2.79", features = ['rustc-dep-of-std'], default-features =
compiler_builtins = "0.1.0"
cfg-if = "1.0"

[build-dependencies]
cc = "1.0.76"

[features]

# Only applies for Linux and Fuchsia targets
Expand Down
25 changes: 0 additions & 25 deletions library/unwind/build.rs

This file was deleted.

6 changes: 1 addition & 5 deletions library/unwind/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,10 @@ cfg_if::cfg_if! {
cfg_if::cfg_if! {
if #[cfg(feature = "llvm-libunwind")] {
compile_error!("`llvm-libunwind` is not supported for Android targets");
} else if #[cfg(feature = "system-llvm-libunwind")] {
} else {
#[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
#[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
extern "C" {}
} else {
#[link(name = "gcc", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
#[link(name = "gcc", cfg(not(target_feature = "crt-static")))]
extern "C" {}
}
}
// Android's unwinding library depends on dl_iterate_phdr in `libdl`.
Expand Down

0 comments on commit a9e1852

Please sign in to comment.