Invoke backtrace-rs' buildscript in std's buildscript for Android targets#99883
Closed
Arc-blroth wants to merge 2 commits intorust-lang:masterfrom
Closed
Invoke backtrace-rs' buildscript in std's buildscript for Android targets#99883Arc-blroth wants to merge 2 commits intorust-lang:masterfrom
backtrace-rs' buildscript in std's buildscript for Android targets#99883Arc-blroth wants to merge 2 commits intorust-lang:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On Android targets,
backtrace-rsuses the buildscript to detect if the Android API level, which is needed to enable backtrace symbolication on targets with Android API >= 21. This PR ensures thatbacktrace-rs's buildscript is invoked as part of the standard library directly including backtrace.Alongside the patch from rust-lang/cc-rs#705, this should fix backtraces not being symbolicated on Android, though I have only tested this when building from Windows.
Note that this PR will be essentially a no-op as of right now, since the Rust CI builds with a minimum Android API level of 14 (see rust-lang/release-team#9). A custom toolchain build with a higher minimum API level is required to actually get backtraces with symbols as of right now.
A config.toml for building with the latest Android NDK
According to the latest Android Platform API Version Distribution, only about 0.4% of Android devices are on Android API version 19 or below, though the latest NDK still supports a lowest API version of 19 (but only for
armv7a-linux-androideabiandi686-linux-androidand not the other architectures ???).