commit | 2d674b68b6d7c1d15de37aec691f2d5afa0dd14f | [log] [tgz] |
---|---|---|
author | Ryan Prichard <rprichard@google.com> | Mon Oct 16 23:13:32 2023 -0700 |
committer | Ryan Prichard <rprichard@google.com> | Thu Apr 11 16:05:42 2024 -0700 |
tree | dfb7382f9288fb0fc0c1d22f1f3a2512a32f82f8 | |
parent | 26b0add08447e578779d9da9d13244b62e1a4a56 [diff] |
Switch to the libc++ toolchain prebuilt Android currently uses external/libcxx and external/libcxxabi for its libc++ STL, but these repositories haven't been updated since January 2019. Instead, build libc++ as part of the Android Clang build, and use a prebuilt libc++ for device and host Soong builds. The Clang prebuilt already had Soong modules, "libc++_host" and "libc++abi_host", that imported libc++[abi].{so,dylib} for Darwin+Linux host only. The clang-tools (e.g. vndk/tools/header-checker, versioner) need to link against the LLVM prebuilt (e.g. libclang-cpp.so), so they also must use the newer libc++.so that libclang-cpp.so uses. Generalize these imports by renaming the llvm_host_prebuilt_library_shared Soong module type to llvm_prebuilt_library_shared, and renaming the modules: * libc++_host --> libc++ * libc++abi_host --> libc++abi_shared Avoid renaming the ABI module to just "libc++abi" because the old external/libcxxabi also defined a "libc++abi" module, but it was a static library instead. Add a new "libc++abi_static" module. It isn't clear if these ABI modules are really needed, though. The old "libc++abi" didn't appear used anywhere in Android's bp/mk files, and the libc++abi object files are exported from libc++[_static]. The ABI modules are now host-only, but it may be sensible to remove them altogether. Soong also has an NDK libc++ (in prebuilts/ndk/Android.bp), which will be switched later to the Clang prebuilt. Previously, the LLVM_BUILD_HOST_TOOLS environment variable set "enabled" to false for both llvm_host_prebuilt_library_shared (e.g. libc++_host) and the llvm_host_defaults module (i.e. clang-tools), but now it only affects the latter. This environment variable can probably be removed entirely eventually, leaving the clang-tools modules enabled unconditionally. Bug: http://b/332594828 Test: treehugger Change-Id: I78714516f2734e7bc8d0e80e71cd62bc8113a365
For the latest version of this doc, please make sure to visit: Android Clang/LLVM Prebuilts Readme Doc
Android Platform LLVM binutils
kleaf/versions.bzl
needs to be updated.Context Hub Runtime Environment (CHRE)
Android Rust
Stage 1 compiler
Android Studio / Android Game Development Extension
We have a public mailing list that you can subscribe to: android-llvm@googlegroups.com
See also our release notes.