Remove build.rs
for Android when assuming API level is always >=21
#82
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since Rust 1.82 the minimum Android API level is 21. In
backtrace
, this warranted the removal of the API version check via__ANDROID_API__
in rust-lang/backtrace-rs#656 since it is now always known to be >=21. Whenfindshlibs
bumps its MSRV the same could be done.Important
This is a draft to remind us to remove the code some day when the MSRV is bumped. I completely understand that's likely not desired now or soon, but at least we have it tracked until that time comes.
This change is sparked by a long search for why backtraces always had
<unknown>
symbols on Android - and when solving that by upgrading Rust (forstd::backtrace
) or ourbacktrace
dependency, why Sentry reports did not record what images/libraries were loaded at which offsets to resolve stack addresses back to function symbols. It turned out that thexbuild
build tool never set__ANDROID_API__
(by not tellingclang
about the target API level via the triple) which would cause this code to never setfeature = "dl_iterate_phdr"
to search for libraries on Android: rust-mobile/xbuild#209