Currently F-Droid builds split architecture .apks
by invoking ndk-make.sh with architecture argument.
This results in debug builds of the core.
This change makes debug builds explicit.
Setting __ANDROID_API__ manually causes
'__ANDROID_API__' macro redefined [-Werror,-Wmacro-redefined]
when compiling the `ring` crate dependency.
TARGET_CC wrapper should set necessary variables itself.
See similar issue in the `ring` bugtracker for explanation:
https://github.com/briansmith/ring/issues/1519
This allows to build the core on systems without rustup.
In this case system rust is used,
but there is no error due to `+1.64.0`
being unknown argument to non-rustup cargo.
Common way to configure `mold` is to set
RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=/usr/bin/mold"
This breaks cross-compilation, as wrong linker is used.