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 #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 d449758
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 44 deletions.
2 changes: 1 addition & 1 deletion library/backtrace
Submodule backtrace updated 49 files
+0 −48 .github/actions/build-with-patched-std/action.yml
+0 −111 .github/actions/report-code-size-changes/action.yml
+0 −151 .github/workflows/check-binary-size.yml
+18 −20 .github/workflows/main.yml
+1 −0 .gitignore
+0 −221 Cargo.lock
+10 −13 Cargo.toml
+7 −24 build.rs
+18 −9 ci/android-ndk.sh
+3 −3 ci/docker/aarch64-linux-android/Dockerfile
+3 −3 ci/docker/arm-linux-androideabi/Dockerfile
+3 −3 ci/docker/armv7-linux-androideabi/Dockerfile
+3 −3 ci/docker/i686-linux-android/Dockerfile
+3 −3 ci/docker/x86_64-linux-android/Dockerfile
+9 −15 crates/as-if-std/Cargo.toml
+0 −8 crates/as-if-std/build.rs
+1 −2 crates/as-if-std/src/lib.rs
+1 −1 crates/debuglink/Cargo.toml
+1 −1 crates/dylib-dep/Cargo.toml
+1 −1 crates/line-tables-only/Cargo.toml
+7 −8 crates/line-tables-only/src/lib.rs
+1 −1 crates/macos_frames_test/Cargo.toml
+1 −1 crates/without_debuginfo/Cargo.toml
+4 −0 src/android-api.c
+152 −139 src/backtrace/dbghelp.rs
+3 −15 src/backtrace/libunwind.rs
+2 −34 src/backtrace/mod.rs
+21 −45 src/dbghelp.rs
+2 −11 src/lib.rs
+11 −20 src/print.rs
+2 −7 src/print/fuchsia.rs
+38 −56 src/symbolize/dbghelp.rs
+17 −101 src/symbolize/gimli.rs
+2 −12 src/symbolize/gimli/coff.rs
+11 −83 src/symbolize/gimli/elf.rs
+0 −74 src/symbolize/gimli/libs_aix.rs
+8 −12 src/symbolize/gimli/libs_dl_iterate_phdr.rs
+4 −13 src/symbolize/gimli/macho.rs
+1 −6 src/symbolize/gimli/mmap_unix.rs
+1 −1 src/symbolize/gimli/mmap_windows.rs
+27 −80 src/symbolize/gimli/parse_running_mmaps_unix.rs
+12 −10 src/symbolize/gimli/stash.rs
+0 −186 src/symbolize/gimli/xcoff.rs
+1 −1 src/symbolize/mod.rs
+2 −54 src/windows.rs
+1 −3 tests/accuracy/main.rs
+5 −2 tests/current-exe-mismatch.rs
+0 −56 tests/sgx-image-base.rs
+20 −31 tests/smoke.rs
2 changes: 1 addition & 1 deletion library/stdarch
Submodule stdarch updated 101 files
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
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide
Submodule rustc-dev-guide updated 98 files
+0 −1 .editorconfig
+1 −1 README.md
+0 −2 examples/rustc-driver-example.rs
+0 −2 examples/rustc-driver-getting-diagnostics.rs
+0 −2 examples/rustc-driver-interacting-with-the-ast.rs
+3 −14 src/SUMMARY.md
+1 −0 src/about-this-guide.md
+1 −1 src/appendix/background.md
+1 −7 src/appendix/glossary.md
+1 −1 src/backend/implicit-caller-location.md
+6 −7 src/backend/updating-llvm.md
+0 −154 src/borrow_check/drop_check.md
+2 −2 src/bug-fix-procedure.md
+18 −18 src/building/bootstrapping.md
+7 −7 src/building/build-install-distribution-artifacts.md
+6 −6 src/building/compiler-documenting.md
+45 −119 src/building/how-to-build-and-run.md
+2 −2 src/building/new-target.md
+0 −129 src/building/optimized-build.md
+1 −1 src/building/prerequisites.md
+32 −57 src/building/suggested.md
+2 −2 src/closure.md
+3 −0 src/compiler-src.md
+1 −1 src/compiler-team.md
+45 −4 src/const-eval.md
+1 −1 src/constants.md
+74 −72 src/contributing.md
+4 −4 src/conventions.md
+2 −2 src/debugging-support-in-rustc.md
+0 −77 src/diagnostics.md
+8 −9 src/diagnostics/diagnostic-structs.md
+1 −1 src/diagnostics/error-codes.md
+5 −6 src/diagnostics/translation.md
+0 −10 src/early-late-bound-summary.md
+50 −2 src/early-late-bound.md
+0 −66 src/effects.md
+35 −6 src/feature-gates.md
+3 −3 src/fuzzing.md
+13 −13 src/generic_arguments.md
+26 −25 src/generics.md
+3 −7 src/getting-started.md
+42 −28 src/git.md
+2 −9 src/hir-debugging.md
+2 −2 src/identifiers.md
+ src/img/coverage-graphviz-01.png
+ src/img/coverage-spanview-01.png
+32 −56 src/implementing_new_features.md
+0 −42 src/licenses.md
+127 −42 src/llvm-coverage-instrumentation.md
+1 −1 src/macro-expansion.md
+5 −5 src/memory.md
+1 −77 src/mir/index.md
+7 −6 src/mir/optimizations.md
+1 −1 src/mir/visitor.md
+5 −5 src/name-resolution.md
+3 −3 src/notification-groups/about.md
+2 −2 src/notification-groups/cleanup-crew.md
+1 −1 src/overview.md
+2 −0 src/parallel-rustc.md
+1 −1 src/part-2-intro.md
+1 −1 src/part-3-intro.md
+1 −1 src/part-4-intro.md
+5 −5 src/profiling.md
+2 −2 src/profiling/with_perf.md
+2 −2 src/profiling/wpa_profiling.md
+1 −1 src/query.md
+0 −437 src/return-position-impl-trait-in-trait.md
+4 −4 src/rustbot.md
+1 −1 src/rustc-driver-getting-diagnostics.md
+1 −1 src/rustc-driver-interacting-with-the-ast.md
+1 −1 src/rustc-driver.md
+3 −5 src/rustdoc-internals.md
+5 −5 src/rustdoc.md
+3 −3 src/salsa.md
+1 −1 src/sanitizers.md
+3 −3 src/serialization.md
+0 −145 src/solve/invariants.md
+0 −80 src/solve/normalization.md
+0 −50 src/solve/proof-trees.md
+7 −66 src/solve/the-solver.md
+69 −2 src/solve/trait-solving.md
+4 −4 src/stability.md
+1 −1 src/stabilization_guide.md
+3 −3 src/tests/adding.md
+3 −3 src/tests/ci.md
+12 −72 src/tests/compiletest.md
+1 −1 src/tests/docker.md
+4 −8 src/tests/headers.md
+31 −30 src/tests/intro.md
+23 −32 src/tests/running.md
+0 −55 src/tests/suggest-tests.md
+4 −7 src/tests/ui.md
+1 −1 src/thir.md
+1 −1 src/traits/resolution.md
+0 −120 src/turbofishing-and-early-late-bound.md
+15 −17 src/ty.md
+1 −1 src/walkthrough.md
+0 −199 src/what-does-early-late-bound-mean.md
2 changes: 1 addition & 1 deletion src/llvm-project
2 changes: 1 addition & 1 deletion src/tools/cargo
Submodule cargo updated 1313 files

0 comments on commit d449758

Please sign in to comment.