Skip to content

Commit 04105e3

Browse files
committed
chore: remove dl_iterate_phdr_feature
1 parent fd0aed5 commit 04105e3

File tree

5 files changed

+6
-79
lines changed

5 files changed

+6
-79
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
name = "backtrace"
33
version = "0.3.73"
44
authors = ["The Rust Project Developers"]
5-
build = "build.rs"
65
license = "MIT OR Apache-2.0"
76
readme = "README.md"
87
repository = "https://github.com/rust-lang/backtrace-rs"
@@ -49,11 +48,6 @@ version = "0.36.0"
4948
default-features = false
5049
features = ['read_core', 'elf', 'macho', 'pe', 'xcoff', 'unaligned', 'archive']
5150

52-
[build-dependencies]
53-
# Only needed for Android, but cannot be target dependent
54-
# https://github.com/rust-lang/cargo/issues/4932
55-
cc = "1.0.97"
56-
5751
[dev-dependencies]
5852
dylib-dep = { path = "crates/dylib-dep" }
5953
libloading = "0.7"
@@ -74,7 +68,6 @@ serialize-serde = ["serde"]
7468
# purposes. New code should use none of these features.
7569
coresymbolication = []
7670
dbghelp = []
77-
dl_iterate_phdr = []
7871
dladdr = []
7972
kernel32 = []
8073
libunwind = []

build.rs

Lines changed: 0 additions & 55 deletions
This file was deleted.

crates/as-if-std/build.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// backtrace-rs requires a feature check on Android targets, so
2-
// we need to run its build.rs as well.
3-
#[allow(unused_extern_crates)]
4-
#[path = "../../build.rs"]
5-
mod backtrace_build_rs;
6-
71
fn main() {
82
println!("cargo:rustc-cfg=backtrace_in_libstd");
9-
10-
backtrace_build_rs::main();
113
}

src/symbolize/gimli.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl Mapping {
100100
// only borrow `map` and `stash` and we're preserving them below.
101101
cx: unsafe { core::mem::transmute::<Context<'_>, Context<'static>>(cx) },
102102
_map: data,
103-
stash: stash,
103+
stash,
104104
})
105105
}
106106
}
@@ -122,13 +122,11 @@ impl<'data> Context<'data> {
122122
if cfg!(not(target_os = "aix")) {
123123
let data = object.section(stash, id.name()).unwrap_or(&[]);
124124
Ok(EndianSlice::new(data, Endian))
125+
} else if let Some(name) = id.xcoff_name() {
126+
let data = object.section(stash, name).unwrap_or(&[]);
127+
Ok(EndianSlice::new(data, Endian))
125128
} else {
126-
if let Some(name) = id.xcoff_name() {
127-
let data = object.section(stash, name).unwrap_or(&[]);
128-
Ok(EndianSlice::new(data, Endian))
129-
} else {
130-
Ok(EndianSlice::new(&[], Endian))
131-
}
129+
Ok(EndianSlice::new(&[], Endian))
132130
}
133131
})
134132
.ok()?;
@@ -226,7 +224,7 @@ cfg_if::cfg_if! {
226224
target_os = "hurd",
227225
target_os = "openbsd",
228226
target_os = "netbsd",
229-
all(target_os = "android", feature = "dl_iterate_phdr"),
227+
target_os = "android",
230228
),
231229
not(target_env = "uclibc"),
232230
))] {

0 commit comments

Comments
 (0)