1. 程式人生 > >How to build Clang toolchains for Android NDK from source code

How to build Clang toolchains for Android NDK from source code

we have some source changes to LLVM/Clang need add into NDK. After download and change "external/llvm" and build NDK from source. It find out that the changes never works. The code in "external/llvm" is dead code and the binary clang/clang.exe is already in NDK source code dir after repo sync which path is below. Does somebody knows how to build Clang toolchains for Android NDK from LLVM/Clang source code? Most Thanks!


The binary clang/clang.exe is already in NDK source code dir below:
https://android.googlesource.com/platform/prebuilts/clang/host/darwin-x86
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86
https://android.googlesource.com/platform/prebuilts/clang/host/windows-x86

The binary clang/clang.exe is just copy from NDK source code dir. Not build from source code.

android-ndk-r13\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe

android-ndk-r13\toolchains\llvm\prebuilt\linux-x86_64\bin\clang

Thanks for answer again. I checked it, but find out it's saying how to build gcc toolchains from source use the build-gcc.sh. I'm sorry to say there is nothing about llvm toolchains which it's already 

prebuilt binaries placed in below:

Thanks.

Thanks Again!

https://groups.google.com/forum/#!topic/android-ndk/OrCXmCNFark