Repository navigation
Add a documentation for android llvm aot - #2386
Conversation
Add a getting started documentation for compiling and running IREE module with dylib-llvm-aot backend
| $ export ANDROID_ARM64_TOOLCHAIN=<path to put new arm64 toolchain> | ||
| $ $ANDROID_NDK/build/tools/make-standalone-toolchain.sh --arch=arm64 --platform=android-29 \ | ||
| --install-dir=$ANDROID_ARM64_TOOLCHAIN | ||
| $ export IREE_LLVMAOT_LINKER_PATH=$ANDROID_ARM64_TOOLCHAIN/aarch64-linux-android/bin/ld |
There was a problem hiding this comment.
Is this IREE_LLVMAOT_LINKER_PATH path to be read by iree-translate to invoke the linker under the hood? Is it possible to provide a "default" value for it when compiling iree-translate? When cross compiling towards Android, we already specified the ANDROID_ABI and ANDROID_PLATFORM. Together with android.toolchain.cmake, we should be able to figure out which ld to use by using the ANDROID_TOOLCHAIN_PREFIX cmake variable. so here we are requiring to provide the information again and making a standalone toolchain, which is a bit annoying. Particularly because standalone toolchain has a big "obsolete" in its title..
Not really blocking, but want to see what you think here. :)
There was a problem hiding this comment.
Chatted with @antiagainst offline. Very good idea I will file an issue to forward android.toolchain.cmake linker path when building host tools.
|
|
||
| ### Dylib LLVM AOT backend | ||
|
|
||
| To compile iree module for the target android device (assume aarch64,android 29) |
There was a problem hiding this comment.
s/iree/IREE/
s/android/Android/
"Android 10 AArch64"
| ### Dylib LLVM AOT backend | ||
|
|
||
| To compile iree module for the target android device (assume aarch64,android 29) | ||
| we need install standalone toolchain and setting AOT linker path environment |
There was a problem hiding this comment.
the corresponding standalone toolchain
| we need install standalone toolchain and setting AOT linker path environment | ||
| variable: | ||
| ```shell | ||
| $ export ANDROID_ARM64_TOOLCHAIN=<path to put new arm64 toolchain> |
There was a problem hiding this comment.
/path/to/install/the/toolchain
| variable: | ||
| ```shell | ||
| $ export ANDROID_ARM64_TOOLCHAIN=<path to put new arm64 toolchain> | ||
| $ $ANDROID_NDK/build/tools/make-standalone-toolchain.sh --arch=arm64 --platform=android-29 \ |
There was a problem hiding this comment.
I think it's recommended to invoke the .py one.
Add a getting started documentation for compiling and running IREE module with dylib-llvm-aot backend