[PATCH] D158798: [RFC] Android runtimes build demonstration

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 24 16:57:59 PDT 2023


smeenai created this revision.
smeenai added reviewers: danalbert, rprichard, srhines.
Herald added a subscriber: danielkiss.
Herald added a project: All.
smeenai requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158798

Files:
  clang/cmake/caches/Android-libcxx.cmake
  clang/cmake/caches/Android-runtimes.cmake
  llvm/cmake/platforms/Android-runtimes.cmake

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158798.553307.patch
Type: text/x-patch
Size: 5469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230824/77f9f445/attachment.bin>


More information about the cfe-commits mailing list