-
Notifications
You must be signed in to change notification settings - Fork 26
android version downgrade for arm and x86 #99
android version downgrade for arm and x86 #99
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Interesting! Could we get away with 15 in that case? If Android support for Rust in Firefox landed today, it'd only be available on nightly anyway, right?
Spot on! I'd be surprised if an android-9 (or android-15) compiled standard library were incompatible with android-18. And even if so, we can likely work around it like in rust-lang/rust#32415
Ah yeah actually this docker image is used for two different purposes.
Could you leave |
While I'm waiting on some builds elsewhere, I'm gonna give this a run through dev to see what happens to our testing bot |
Looks like the build runs ok but the tests fail unfortunately:
Basically, Perhaps some are available in android-15 though? |
FWIW the building x86 stuff worked out just fine, so I pushed up e5ac28a and we can deploy whenever basically |
FWIW, we did some work on the Firefox side to actually properly enable our Rust code on Android and found that |
Hm ok, so Would it be possible to use |
log2(x) can be implemented as log(x)/log(2). We could either do that in libstd with yet another #cfg version conditional, or patch llvm to provide a fallback in the intrinsic. |
I dunno, I think you'd want to use |
We can probably get by with a shim on Android for now, but I'll send some PRs to the main repo. May as well take care of |
Note that the PR for libstd itself is here: rust-lang/rust#33211 |
e471673
to
9e6ebef
Compare
This change makes them more compatible with Firefox releases, which currently use API level 9 as their baseline. Fixes rust-lang-deprecated#98.
Pushed a new head for just the |
Ah, whoops, I forgot to rebase to HEAD and I see that there has been some shuffling; the |
9e6ebef
to
7937124
Compare
Yeah this is somewhat inconsistent unfortunately. We're not using the current image as listed but rather an older one. The buildmaster config is configured for that one as well. We tried to deploy android-9 but we failed some tests and I haven't had a chance to investigate yet, unfortunately. That is, we tried this out but it unfortunately caused failures. I think the failures were related to |
Ok, I'm working through what is hopefully the last few failures. In addition to |
Compiling Rust's
std
works just fine with API level 9. I didn't see anything too unusual in Rust's system-dependent code when I looked for possible gotchas, but I also didn't test this beyond compiling things.Two interesting things to note that I discovered this morning:
arm-linux-androideabi
andi686-linux-android
sooner rather than later, though, and lowering the requirements as far as possible seems like a good thing in any event.std
compiled against API level 9 ought to work just fine.This pull request also sneaks in what looks like a cleanup: making sure we only have one ARM standalone toolchain built from the NDK. It's entirely possible there are constraints here that I'm not aware of (extra tools? multilibs?), so please do tell me if that commit is bogus, and I'll happily drop it.