bbqsrc/cargo-ndk

Feature Request: Set Env for clang/cc-rs

Closed this issue · 3 comments

Ruffle-Android fails to build with the jpegxr feature on, this is due to the crate using C++ code compiled with the cc crate.
This is due to the include used beeing set to /usr/include instead of the NDK Sysroot.
Is there any chance the env for Clang could be set to prevent this? If this isn't related to cargo-ndk, I'm sorry for bothering.

See:
Output without setting the compiler in jpegxr's build.rs
https://github.com/torokati44/ruffle-android-fork/actions/runs/8660976443/job/23749950385

Output when setting the compiler in jpegxr's build.rs
https://github.com/Fancy2209/ruffle-android/actions/runs/8661894376/job/23752764570

Have you tried with the --bindgen flag?

I have not
Am I supposed to add it to the cargo NDK command or clang?

it was for cargo ndk, completely missed it! that works, thanks