The purpose of this issue is to create a "single point of truth" regarding the efforts related to building React Native using Clang and against libc++, in order to coordinate and recap all the efforts connected to this subject.
Android NDK is about to drop GCC and GNU STL support in favor of Clang and libc++ in version 18. Below are notable changes in NDK
Open ReactAndroid/src/main/jni/Application.mk and remove or comment out NDK_TOOLCHAIN_VERSION
Open ReactAndroid/src/main/jni/Application.mk and set APP_STL := c++_shared
I was able to compile RN with NDK r17, and will create a PR once https://github.com/facebook/react-native/pull/19945 is merged.
Amazing job锛宼hanks.
If I understood correctly, iOS builds with clang agains libc++ and with almost the same native dependencies. So it won't be a big problem to build with Clang, but to use libc++ we may need to build JSC against it. Please correct me if wrong
I'm not that proficient in C++ and don't know much about RN internals, therefore cannot make changes to C++ code to make it compile with Clang. @hramos could you please find someone from Facebook to help with it.
RN master now use clang
Most helpful comment
NDK r17b landed https://github.com/facebook/react-native/commit/6117a6c7205c969f93d39ba02e0583881572d5fa