Replies: 2 comments 2 replies
-
Or maybe there's a way to use Visual Studio for Android dev and use their C++ compiler? I'm not attached to Clang. I just want to use the latest C++. |
Beta Was this translation helpful? Give feedback.
-
So upgrade your NDK? https://github.com/android/ndk/wiki/Changelog-r26 is 17ish.
That's what it takes to build a full multi target toolchain. It's easier to build just the macOS toolchain because you've only done half the work. The compiler isn't the only part of the NDK. You need a sysroot too. That's why there's an NDK and this page isn't just a link to the clang downloads. |
Beta Was this translation helpful? Give feedback.
-
I'm just getting started with the NDK because I want to port some C++ to Android. I want to use the latest Clang (now 17.0.6), because I'm using C++20 modules and other things, and it drives me nuts not using the latest language and library features. I see Clang 14 in the NDK I have currently.
I see these pages:
https://android.googlesource.com/platform/ndk/+/refs/heads/main/docs/Toolchains.md
https://android.googlesource.com/toolchain/llvm_android/+/master/README.md
It sounds rough.
I've built Clang and libc++ from source before, to use on macOS, and tweaked the stdlib namespace so it doesn't conflict with a system one at load time. Can I just do that, and use my own scripts to build an ARM64 shared object to call from JNI, or does this version of Clang in the NDK have more modifications to produce Android compatible binaries?
Beta Was this translation helpful? Give feedback.
All reactions