Compile compiler-rt with the new Clang on Android
In #40433 (closed) we updated LLVM/clang to version 13.0.1, however there is still room for improvement:
-
build compiler-rt
with the newly built compiler, instead of the NDK- we need to investigate how to use Clang without the NDK
-
make sure lld
works with the x86/x86_64 NDK libraries that have compressed parts (see this similar issue)- we've always used the NDK's linker, so this isn't a big deal, I think (I haven't found what Mozilla does, yet)
- I may have resolved this while switching desktop to 102
-
move Android-specific parts from projects/clang to a new project - Windows and macOS build projects/clang, and then use it to compile their compiler-rt and libc++ in another project (
mingw-w64-clang
andmacosx-toolchain
, respectively). - If we removed all the platform-specific settings from clang, we could compile LLVM once (at least share it between Android and macOS, since they both target x86, arm and aarch64, or enable all the architectures also for Windows; Linux is built on an old host, so no way to share it at the moment...)
- Windows and macOS build projects/clang, and then use it to compile their compiler-rt and libc++ in another project (
Edited by Pier Angelo Vendrame