Android: NDK r19+ support
I've been trying to build simple Qt application with Kirigami for Android and found that ndk r19 isn't working for me and judging from the sources it couldn't work at the moment.
In r19 in build/core/toolchains/arm-linux-androideabi-clang/setup.mk
there no TOOLCHAIN_ROOT
which means when clang is used
(-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang
) Determine-Compiler-NDK.cmake#L120 clears _ANDROID_TOOL_NAME
and it is expected that Determine-Compiler-NDK.cmake#L182 will set it.
However since there is no TOOLCHAIN_ROOT
- _ANDROID_TOOL_NAME
is never populated and when _ANDROID_TOOL_C_TOOLCHAIN_PREFIX
is constructed in Determine-Compiler-NDK.cmake#L231 it becomes incorrect.
I may be doing something inherently wrong since I'm unable to build the app with any ndk for different reasons. But this one looks like a genuine bug.
Manually adding TOOLCHAIN_ROOT := $(call get-toolchain-root,llvm)
to setup.mk moves the build further but fails due to:
android-ndk-r19-beta2/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lunwind
(probably TOOLCHAIN_ROOT
addition is just meaningless)