Which Clang will be in the 2024 LTS NDK, please?

133 views
Skip to first unread message

John Dallman

unread,
Mar 18, 2024, 6:15:50 AMMar 18
to andro...@googlegroups.com
Preface: I am not producing an Android app. I work for a software component business, creating shared libraries, compiled from C and C++ code, for use in third-party customers' apps. I test my libraries in a command-line test harness, which I run in the ADB shell. I am only producing software for 64-bit ARM, because none of the customers want 32-bit code. 

I'm making plans for my next upgrade to a new NDK. Because I produce libraries, not complete apps, I need to coordinate this with my customers, so I'm making plans now for a software release in mid-2025. 

There's due to be a new LTS NDK in 2024, but the Android NDK wiki (https://github.com/android/ndk/wiki) says:

The 2024 LTS will either be r27 or r28, but we haven't yet decided which. We will aim for a Q3 LTS release as usual, but depending on when r27 stabilizes we may end up with a late Q2 r27 LTS instead to avoid having the LTS too late in the year.
 
The important thing for me about the new LTS NDK is the degree of C++23 support in it. Clang 18 looks to be the latest Clang that could be in the 2024 LTS NDK. Will it be there?

If it isn't, this is not a disaster, but it postpones my ability to support C++23 by a year. Knowing about that as early as possible is helpful. 

Thanks, 

John  

Dan Albert

unread,
Mar 19, 2024, 4:39:44 PMMar 19
to andro...@googlegroups.com
The clang that's currently in our main branch is the one that should be in the LTS (which we've decided will be r27, I'll go update the wiki). https://android.googlesource.com/platform/ndk/+/refs/heads/main/docs/ContinuousBuilds.md has instructions for downloading that if you want even more of a headstart than the beta (which will be out Soon TM).

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAH1xqgn%3DN9CM-_ryGJ5jr6Hq78scY8eR3GhYugoYohfBs762vg%40mail.gmail.com.

John Dallman

unread,
Mar 20, 2024, 9:55:05 AMMar 20
to andro...@googlegroups.com
> The clang that's currently in our main branch is the one that should be in the LTS

That clang presumably isn't v18, because that is not yet released by LLVM. Looks like I need to wait for the 2025 NDK to get C++23, but thanks for the information. 

John

enh

unread,
Mar 20, 2024, 10:28:39 AMMar 20
to andro...@googlegroups.com
well, it's a bit more complicated than that... these things always come across _many_ versions (and there's c++20 stuff that's not finished yet), so it depends exactly what you're waiting for. https://clang.llvm.org/cxx_status.html is a good place to look, but honestly "try to use the thing you want to use, and see whether it's working well enough yet". (because just because it's marked as done doesn't mean it isn't buggy!)

(and if you actually mean _library_ features rather than language features, that's an orthogonal question...)

Dan Albert

unread,
Mar 20, 2024, 6:08:43 PMMar 20
to andro...@googlegroups.com
The NDK doesn't track LLVM releases (they don't meet our quality bar). The only accurate description of the LLVM version used in an NDK is the `clang_source_info.md` in the toolchain directory (which the readme used to try to describe a bit more closely as "trunk development of version blah", but now is very explicit that you need to go into the file to know what you're getting).

John Dallman

unread,
Mar 21, 2024, 10:36:04 AMMar 21
to andro...@googlegroups.com
On Wed, Mar 20, 2024 at 7:28 AM 'enh' via android-ndk <andro...@googlegroups.com> wrote:
well, it's a bit more complicated than that... these things always come across _many_ versions (and there's c++20 stuff that's not finished yet), so it depends exactly what you're waiting for. https://clang.llvm.org/cxx_status.html is a good place to look, but honestly "try to use the thing you want to use, and see whether it's working well enough yet". (because just because it's marked as done doesn't mean it isn't buggy!)

(and if you actually mean _library_ features rather than language features, that's an orthogonal question...)

OK, my question was stupid. I was hoping for "basically complete C++23" to get a superset on Android of the C++23 that the company will adopt, which will be the functional intersection of GCC 14.1 for Linux (not released yet) and a late Visual Studio 2022 release (also not available yet).     

'Dan Albert' via android-ndk <andro...@googlegroups.com> wrote:
The NDK doesn't track LLVM releases (they don't meet our quality bar).

Ah, OK. 
 
The only accurate description of the LLVM version used in an NDK is the `clang_source_info.md` in the toolchain directory (which the readme used to try to describe a bit more closely as "trunk development of version blah", but now is very explicit that you need to go into the file to know what you're getting).

I'm not finding `clang_source_info.md` in the Linux copy of NDK23b I'm using. Is that too old for this system of identity? 

Thanks very much, 

John
 

On Wed, Mar 20, 2024 at 7:28 AM 'enh' via android-ndk <andro...@googlegroups.com> wrote:
well, it's a bit more complicated than that... these things always come across _many_ versions (and there's c++20 stuff 

Dan Albert

unread,
Mar 21, 2024, 5:23:34 PMMar 21
to andro...@googlegroups.com
OK, my question was stupid. I was hoping for "basically complete C++23" to get a superset on Android of the C++23 that the company will adopt, which will be the functional intersection of GCC 14.1 for Linux (not released yet) and a late Visual Studio 2022 release (also not available yet).     

If you're comparing against a newer GCC and a newer MSVC, you'll probably have fewer features with the NDK just by the nature of our release being first. Whether or not the NDK will be Good Enough for your use is pretty difficult to predict. "complete" any C++ standard takes ages. See the status page enh linked above: even C++20 isn't truly done yet, but if you go dig through the details, it's likely a dozen little things that most people will never notice, not major missing features.
 
I'm not finding `clang_source_info.md` in the Linux copy of NDK23b I'm using. Is that too old for this system of identity? 

Possibly. I don't know when that was added. There might be some other similar documentation in the same directory, at least an AndroidVersion.txt (.txt? .md? idr). I think that's been around a lot longer, though it's less useful. 

Reply all
Reply to author
Forward
0 new messages