Open Michael-Lfx opened 6 years ago
Thanks for filing the issue!
It doesn't appear to be directly related to us, but rather to cc
dependency:
Internal error occurred: Failed to find tool. Is
aarch64-linux-android-gcc
installed?
This is a configuration issue. Here are the steps I took to get android building (works for lots of projects):
mkdir .NDK
${NDK_HOME}/build/tools/make_standalone_toolchain.py --api 26 --arch arm64 --install-dir .NDK/arm64
# any additional architectures here
PATH
variable. Mozilla says to use a cargo config
file, but I think that's not enough for certain dependencies (e.g. ones using cc
).
PATH=".NDK/arm64/bin:$PATH"
# add any additional toolchains to PATH
cargo build --target aarch64-linux-android
Also, the executables won't work - android only supports native code as libraries.. A rooted phone can run binaries, but I'm pretty sure glsl-to-spirv
just won't work on mobile - it's not architected with that use case in mind. As a workaround, running glsl-to-spirv
in build.rs
should work.
I'll try to get Android (and iOS) on CI in the next week or so.
When using
cargo build --bins --target=aarch64-linux-android --features=vulkan
to build so for Android, it fails with the following output.