rust-mobile/ndk

`cargo apk -- build --release` doesn't build in `release` profile anymore

torokati44 opened this issue · 3 comments

I'm trying to use cargo-apk to only build a shared library from Rust which then I'll load and use from a "regular" (Java+Kotlin) Android project - so I don't need any APK generation, code signing, etc. from cargo-apk.

I was using cargo apk -- build --release for this, as suggested here: #326 (comment)

This used to work well, however, since then, it has stopped building in release mode for some reason, as can be seen here:
https://github.com/torokati44/ruffle-android/actions/runs/3623790481/jobs/6110051919

image

image

Perhaps this was caused by #363.

This is specifically caused by e2b9db4 as args.update_from_arg_matches(&m).unwrap(); is setting Args::release back to false if --release wasn't present in the new args.

I'll investigate if this is intended, if there's a way around it, or if I should just revert that specific commit.

Thank you for the quick fix, now it works just as well as before!