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


https://android.googlesource.com/platform/ndk.git/+/master/build/tools/build-llvm.py 

https://android.googlesource.com/platform/ndk.git/+/master/build/tools/#II_Host-toolchains

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:

https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/refs/heads/master/clang-3362437/bin/
And there is nothing I can find about how to build it with Google searching or in it's WIKI.
Thanks.


It looks like I need to delete some old docs. The doc you're looking for is https://android.googlesource.com/platform/ndk/+/master/docs/Toolchains.md

Thank you very much! With this link and some test (most times one change need a total rebuild) I finally make it works!
The work also need this:
https://android.googlesource.com/platform/external/clang/+/dev/ToolchainPrebuilts.md

Thanks Again!


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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值