-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] changelog is not clear about the LLVM version #1939
Comments
The version of Clang in r26 doesn't have this because upstream LLVM didn't. r27 will have a newer compiler. I'm closing this because the only work here for us is "update clang again", which is something we always do as part of every major version, and we don't bother with tracking bugs for that (I can guarantee that I will not remember to close this bug when it is fixed, so it's not going to be a useful source of data). |
According to r26 release notes: Updated LLVM to clang-r487747c, based on LLVM 17 development. Clang 17 does have the C++23 switch. How come the bundled doesn't do it? AFAIK these switches were added several months ago. I'd argue that this is a bug as I expect that CMake provides the correct switches. |
It is not 17.0. It is a development snapshot of LLVM 17. See the AndroidVersion.txt file in the same directory as the Clang binary. |
i suspect that's going to confuse others too. did we have clearer wording in the past we can reuse? if not, should we be more explicit with something like "between LLVM 16 and 17"? |
It's the wording we've always used: https://github.com/android/ndk/wiki/Changelog-r17. Prior to NDK r17 changelogs didn't mention the LLVM version at all. It was much more obvious what the text meant when LLVM was still on svn and that revision number meant something obvious. I was working on improving the wording already, but I'm about a dozen "one five minute task"s deep right now, so I'll reopen this so I don't forget to do that when I inevitably don't get to it today. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Bug: android/ndk#1939 Test: None (cherry picked from commit 843ac1b) (cherry picked from https://android-review.googlesource.com/q/commit:6dc9d000a28c149220c3c3dbe23605d1b1d0c94a) Merged-In: I6c5e612678487ae3398ff7bf9aafa754494dd094 Change-Id: I6c5e612678487ae3398ff7bf9aafa754494dd094
@DanAlbert The release notes:
And checking in the toolchain directory I see the version number: |
No, and it never will be. We will always build our own binaries for supply chain protection reasons. They are not going to be a direct match to any upstream release in the near future because upstream releases rarely meet the quality bar required to build Android.
That version isn't mentioned in the release notes. |
not directly, but the release notes now point you here, which does say 17.0.2:
|
Ah. That's up to @pirama-arumuga-nainar |
@H-G-Hristov what questions are you actually trying to answer by finding the version number? The problem is that there is no version number to find other than the one in the changelog. "What is in this LLVM?" is answered by |
We should remove the mention of AndroidVersion.txt. |
This will also help going forward. Official LLVM releases will have a version of |
This is a bit off-topic. I implemented several libc++ papers in LLVM 18 but none of them were included in NDK r27 currently. When does branching LLVM happen in AOSP? |
Bug: android/ndk#1939 Test: None Change-Id: I6c5e612678487ae3398ff7bf9aafa754494dd094
Bug: android/ndk#1939 Test: None Change-Id: I22c20ded2df687174719fa9ee158481266fdd176
Description
Using C++23 with the NDK r26
with latest CMake
Adding this line to the default sample create by Android studio fails with:
FAILURE: Build completed with 4 failures. 1: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'. > com.android.ide.common.process.ProcessException: ninja: Entering directory `/Users/hristohristov/AndroidStudioProjects/MyApplication2/app/.cxx/Debug/3c5w5n6q/arm64-v8a' [1/2] Building CXX object CMakeFiles/myapplication.dir/native-lib.cpp.o FAILED: CMakeFiles/myapplication.dir/native-lib.cpp.o /Users/hristohristov/Library/Android/sdk/ndk/26.0.10792818/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android29 --sysroot=/Users/hristohristov/Library/Android/sdk/ndk/26.0.10792818/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Dmyapplication_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -std=gnu++23 -fPIC -MD -MT CMakeFiles/myapplication.dir/native-lib.cpp.o -MF CMakeFiles/myapplication.dir/native-lib.cpp.o.d -o CMakeFiles/myapplication.dir/native-lib.cpp.o -c /Users/hristohristov/AndroidStudioProjects/MyApplication2/app/src/main/cpp/native-lib.cpp error: invalid value 'gnu++23' in '-std=gnu++23' note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard note: use 'c++11' for 'ISO C++ 2011 with amendments' standard note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard note: use 'c++14' for 'ISO C++ 2014 with amendments' standard note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard note: use 'c++17' for 'ISO C++ 2017 with amendments' standard note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard note: use 'c++20' for 'ISO C++ 2020 DIS' standard note: use 'gnu++20' for 'ISO C++ 2020 DIS with GNU extensions' standard note: use 'c++2b' for 'Working draft for ISO C++ 2023 DIS' standard note: use 'gnu++2b' for 'Working draft for ISO C++ 2023 DIS with GNU extensions' standard ninja: build stopped: subcommand failed. C++ build system [build] failed while executing: /opt/homebrew/bin/ninja \ -C \ /Users/hristohristov/AndroidStudioProjects/MyApplication2/app/.cxx/Debug/3c5w5n6q/arm64-v8a \ myapplication from /Users/hristohristov/AndroidStudioProjects/MyApplication2/app
It looks like the toolchain doesn't support the latest standards C++23, C++26.
The text was updated successfully, but these errors were encountered: