How to set custom build flags for android target

Hi, guys

I want to use cargo to build a android target in arm mode. for cmake project, it can be done by set a custom build flag to cmake e.g -DANDROID_ARM_MODE=arm. (CMake  |  Android NDK  |  Android Developers)

But I have no idea how to do it in cargo/rust project, and I can't find any document about that.

Any help would be appreciate!

emm.. seems this works:
RUSTFLAGS='-C target-feature=-thumb-mode' cargo b --target armv7-linux-androideabi

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.