Skip to content

Commit df444be

Browse files
authored
Remove coresymbolication implementation (#316)
* Remove coresymbolication implementation This isn't used anywhere by default any more and I don't think there's any reason to enable it. This older implementation uses private APIs which aren't supposed to be used. Additionally libbacktrace nowadays should be workable enough and with gimli soon on the horizon that should be a suitable default for macOS and iOS. * Disable android emulator in CI
1 parent 688e20e commit df444be

File tree

9 files changed

+10
-326
lines changed

9 files changed

+10
-326
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,9 @@ jobs:
6565
- run: cargo test --no-default-features --features "libunwind dladdr std"
6666
- run: cargo test --no-default-features --features "libunwind libbacktrace std"
6767
- run: cargo test --no-default-features --features "libunwind libbacktrace dbghelp std"
68-
- run: cargo test --no-default-features --features "libunwind coresymbolication dbghelp std"
69-
- run: cargo test --no-default-features --features "libunwind coresymbolication dbghelp std libbacktrace"
7068
- run: cargo test --no-default-features --features "unix-backtrace std"
7169
- run: cargo test --no-default-features --features "unix-backtrace dladdr std"
7270
- run: cargo test --no-default-features --features "unix-backtrace libbacktrace std"
73-
- run: cargo test --no-default-features --features "unix-backtrace coresymbolication std"
7471
- run: cargo test --no-default-features --features "serialize-serde std"
7572
- run: cargo test --no-default-features --features "serialize-rustc std"
7673
- run: cargo test --no-default-features --features "serialize-rustc serialize-serde std"
@@ -80,7 +77,6 @@ jobs:
8077
- run: cargo test --manifest-path crates/cpp_smoke_test/Cargo.toml
8178
- run: cargo test --manifest-path crates/macos_frames_test/Cargo.toml
8279
- run: cargo test --features libbacktrace --manifest-path crates/without_debuginfo/Cargo.toml
83-
- run: cargo test --features "libbacktrace coresymbolication" --manifest-path crates/without_debuginfo/Cargo.toml
8480
- run: cargo test --features "libbacktrace gimli-symbolize" --manifest-path crates/without_debuginfo/Cargo.toml
8581
- run: cargo test --manifest-path crates/line-tables-only/Cargo.toml --features libbacktrace
8682
- run: cargo test --manifest-path crates/line-tables-only/Cargo.toml --features gimli-symbolize

Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,13 @@ kernel32 = []
8484
# - dladdr: this feature uses the dladdr(3) function (a glibc extension) to
8585
# resolve symbol names. This is fairly unreliable on linux, but works well
8686
# enough on OSX.
87-
# - coresymbolication: this feature uses the undocumented core symbolication
88-
# framework on OS X to symbolize. Note that this is not turned on default due
89-
# to various issues, you can see more in #202.
9087
# - gimli-symbolize: use the `gimli-rs/addr2line` crate to symbolicate
9188
# addresses into file, line, and name using DWARF debug information. At
9289
# the moment, this is only possible when targetting Linux, since macOS
9390
# splits DWARF out into a separate object file. Enabling this feature
9491
# means one less C dependency.
9592
libbacktrace = ["backtrace-sys/backtrace-sys"]
9693
dladdr = []
97-
coresymbolication = []
9894
gimli-symbolize = ["addr2line", "goblin"]
9995

10096
#=======================================
@@ -104,6 +100,12 @@ gimli-symbolize = ["addr2line", "goblin"]
104100
serialize-rustc = ["rustc-serialize"]
105101
serialize-serde = ["serde"]
106102

103+
#=======================================
104+
# Deprecated features
105+
#
106+
# Only here for backwards compatibility purposes, they do nothing now.
107+
coresymbolication = []
108+
107109
#=======================================
108110
# Internal features for testing and such.
109111
verify-winapi = [

ci/docker/arm-linux-androideabi/Dockerfile

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1111

1212
COPY android-ndk.sh /
1313
RUN /android-ndk.sh arm
14-
WORKDIR /android
15-
COPY android-sdk.sh /android/sdk.sh
16-
RUN ./sdk.sh arm
17-
RUN mv /root/.android /tmp
18-
RUN chmod 777 -R /tmp/.android
19-
RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
20-
ENV PATH=$PATH:/android-toolchain/bin:/android/sdk/platform-tools
14+
ENV PATH=$PATH:/android-toolchain/bin
2115

2216
# TODO: run tests in an emulator eventually
2317
ENV CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
24-
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \
25-
HOME=/tmp
26-
27-
ADD runtest-android.rs /tmp/runtest.rs
28-
ENTRYPOINT [ \
29-
"bash", \
30-
"-c", \
31-
# set SHELL so android can detect a 64bits system, see
32-
# http://stackoverflow.com/a/41789144
33-
"SHELL=/bin/dash /android/sdk/emulator/emulator @arm -no-window & \
34-
/rust/bin/rustc /tmp/runtest.rs -o /tmp/runtest && \
35-
exec \"$@\"", \
36-
"--" \
37-
]
18+
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=echo

crates/without_debuginfo/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ debug = false
2727

2828
[features]
2929
libbacktrace = ['backtrace/libbacktrace']
30-
coresymbolication = ['backtrace/coresymbolication']
3130
gimli-symbolize = ['backtrace/gimli-symbolize']

src/symbolize/coresymbolication.rs

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

src/symbolize/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -476,16 +476,6 @@ cfg_if::cfg_if! {
476476
use self::gimli::resolve as resolve_imp;
477477
use self::gimli::Symbol as SymbolImp;
478478
use self::gimli::clear_symbol_cache as clear_symbol_cache_imp;
479-
// Note that we only enable coresymbolication on iOS when debug assertions
480-
// are enabled because it's helpful in debug mode but it looks like apps get
481-
// rejected from the app store if they use this API, see #92 for more info
482-
} else if #[cfg(all(feature = "coresymbolication",
483-
any(target_os = "macos",
484-
all(target_os = "ios", debug_assertions))))] {
485-
mod coresymbolication;
486-
use self::coresymbolication::resolve as resolve_imp;
487-
use self::coresymbolication::Symbol as SymbolImp;
488-
unsafe fn clear_symbol_cache_imp() {}
489479
} else if #[cfg(all(feature = "libbacktrace",
490480
any(unix, all(windows, not(target_vendor = "uwp"), target_env = "gnu")),
491481
not(target_os = "fuchsia"),

tests/accuracy/auxiliary.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ where
77
}
88

99
#[inline(always)]
10-
#[cfg_attr(feature = "coresymbolication", inline(never))]
1110
pub fn callback_inlined<F>(f: F)
1211
where
1312
F: FnOnce((&'static str, u32)),

0 commit comments

Comments
 (0)