[libcxx-commits] [libcxx] [libc++][Android] Restrict use of mblen/towctrans/wctrans (PR #116147)

Ryan Prichard via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 28 14:21:33 PST 2024


rprichard wrote:

+ @DanAlbert

> To understand, these Android API versions are like SDK versions, is that right? Does this basically mean that Android API 21 is the "SDK" released in 2014 as part of Android 5, so basically you'd support using a new libc++ against an Android SDK released in 2014?
> 
> What is the intended support policy for libc++ on Android? At what frequency is support for older platforms dropped? I'd just like to make sure that there is some reasonable policy in place to make sure we don't end up having to support ancient SDKs (which often doesn't add much value since mixing a new libc++ with an old SDK is a niche use case). For example, for Apple platforms we officially support only the latest released XCode (with the matching SDK).

It's more like the version of Android itself rather than the version of the SDK (NDK). Android 5.0 is Android Lollipop, which is also API level 21. (Android 5.1 is API level 22 instead.) (See https://apilevels.com.) Each Android release has three similar versions (API level, version number, and codename). The NDK contains a copy of libc++, and the NDK is on a separate release schedule from the Android OS. https://developer.android.com/ndk/downloads/revision_history

When the NDK cuts a new release, with a recent version of libc++, the new NDK supports targeting older Android versions. This lets app developers use the latest Clang and libc++ even though they still need to support old versions of Android.

I think the Android team would like libc++ to continue supporting an Android OS for as long as the NDK does. Currently the NDK supports API level 21 and up, but we expect to drop old API levels over time. (The minimum supported API level has been steadily marching up over the past several years. e.g. NDK r16 supported Android 4.0 and up -- API level 14.) I'll cc @DanAlbert who I think is more familiar with the policy on dropping support for old Android OSs.


https://github.com/llvm/llvm-project/pull/116147


More information about the libcxx-commits mailing list