This demonstrates a possible Android runtimes build setup once
https://reviews.llvm.org/D158476 lands and runtimes library searching
accounts for versioned Android triples. Meta uses a similar setup
internally (except for using a standalone CMake toolchain file instead
of wrapping the NDK's; I'm not actually sure which one I prefer.)
I'm putting this up as a demonstration of aspects of the runtime build
(in particular delegating to separate toolchain and cache files, which I
find to be much more manageable than putting everything in the runtimes
cache file). If the Android toolchain maintainers think it could be
generally useful, I'd be happy for a maintainer to commandeer it and
change it as they see fit, or make any suggested changes myself.
There's some existing Android cache and toolchain files:
- clang/cmake/caches/Android.cmake
- clang/cmake/caches/Android-stage2.cmake
- llvm/cmake/platforms/Android.cmake
As far as I can tell the toolchain file is pretty bit-rotted and the
cache files don't reflect the current NDK runtimes configuration (e.g.
the use of the __ndk1 inline namespace). I'm not changing them here,
but it'd be great if a maintainer could take a look and decide what to
do with them.