rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.32k stars 12.46k forks source link

Request for clarification on arm-linux-androideabi #38576

Closed learnopengles closed 7 years ago

learnopengles commented 7 years ago

I've been doing some reading up about Rust's support for Android, and it seems that now it is essentially a Tier 1, but I'm not sure if Rust's Android targets quite match up with Android's ABI.

For example: Both arm-linux-androideabi and armv7_linux_androideabi seem to be targeting arm-v7a, except armv7 also enables thumb2 mode and disables NEON.

Looking at this page: https://developer.android.com/ndk/guides/abis.html

arm-linux-androideabi should be targeting arm-v5 and using thumb1. I'm not familiar with the back-end of the compiler, but it looks like it should also probably be disabling NEON.

At this point it might not be a big deal, given the world has moved on to arm-v7a and aarch64, but for those not very familiar with the back-end of the compiler, including myself, this might lead to surprising behavior.

I'm also wondering if Rust has support for passing in flags such as the NDKs LOCAL_ARM_MODE, which configures whether to use Thumb or ARM instructions, or if that's fixed to the target and another target would be necessary?

steveklabnik commented 7 years ago

Hey @learnopengles ! We try to keep the bug tracker for bugs only. Questions are better asked on https://internals.rust-lang.org/. Could you ask over there please? Thanks!

learnopengles commented 7 years ago

Well that's just it, I thought it might be a bug, I'm just not 100% sure. But sure, I can ask over there instead. :)