Replacing NDK's LLVM with the one built from source?

187 views
Skip to first unread message

Naville Zhang

unread,
Nov 17, 2022, 5:59:22 AM11/17/22
to android-llvm
Hey:
I'm finally able to build a fairly recent android-llvm from source, what's the "canonical" method to use my local build?
toolchains//llvm/prebuilts/whatever/ contains a bunch other stuff not exists in my local LLVM like:
- ld(not lld)
- arm-linux-androideabi/
- aarch64-linux-android/
- sysroot/

So what's the canonical method to replace my llvm into NDK?
Do I just replace (or merge?) those folders:
- include
- bin
- lib
- lib64
- libexec

Or is there anything else needs to be done?

Pirama Arumuga Nainar

unread,
Nov 17, 2022, 12:36:41 PM11/17/22
to Naville Zhang, Dan Albert, android-llvm
Replacing/dropping in the toolchain should be enough.  +Dan Albert is there an easier way to do this?

--
You received this message because you are subscribed to the Google Groups "android-llvm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-llvm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-llvm/7d42a720-dc3f-475e-9f4b-3999f6736ad9n%40googlegroups.com.

Dan Albert

unread,
Nov 17, 2022, 1:55:36 PM11/17/22
to Pirama Arumuga Nainar, Naville Zhang, android-llvm
It isn't. The output of the tool chain build has never been structured quite right for NDK use. The NDK's build (see the readme.md in the NDK repo) needs to tweak a few things for it to be functional. There is not any easy way to do this, unless you count building the NDK (or repeating that process manually) as easy.

Naville Zhang

unread,
Nov 17, 2022, 8:59:29 PM11/17/22
to android-llvm
Hey Dan:
What I meant was reusing an existing NDK and patch my build in. Is this still requiring rebuilding the full NDK with sys lib?
If I need to replace the stuff manually, is there any hint I should start with?

Dan Albert

unread,
Nov 18, 2022, 2:35:58 PM11/18/22
to Naville Zhang, android-llvm
If I need to replace the stuff manually, is there any hint I should start with?

The only way is to read the NDK's build steps and reproduce them by hand. It won't be less work than just rebuilding. 

Reply all
Reply to author
Forward
0 new messages