File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,18 @@ fn main() {
58
58
|| env:: var ( "RUSTC_BOOTSTRAP_SYNTHETIC_TARGET" ) . is_ok ( )
59
59
{
60
60
// These platforms don't have any special requirements.
61
+ } else if target_os == "android" {
62
+ // Since rust-lang/rust#120593 <https://github.com/rust-lang/rust/pull/120593>,
63
+ // the minimum Android API level change from 19 to 21. And Android supports
64
+ // `dl_iterate_phdr` since API level 21. Please see
65
+ // <https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md>
66
+ // for details. So we can enable `dl_iterate_phdr` feature for Android witout
67
+ // checking the Android API level.
68
+ //
69
+ // Note: after <https://github.com/rust-lang/backtrace-rs/pull/656>, backtrace-rs
70
+ // removed the special build logic for Android. So We can remove the next line,
71
+ // once backtrace-rs in std is updated to the version that includes the change.
72
+ println ! ( "cargo:rustc-cfg=feature=\" dl_iterate_phdr\" " ) ;
61
73
} else {
62
74
// This is for Cargo's build-std support, to mark std as unstable for
63
75
// typically no_std platforms.
You can’t perform that action at this time.
0 commit comments