You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by p via Apache TVM Discuss <no...@discuss.tvm.ai> on 2022/02/10 15:47:17 UTC

[Apache TVM Discuss] [Questions] Which cross-compiler?


Hello,

In ubuntu I can see a lot of compilers for aarch64 or arm32 architecture, e.g.:
```
apt-cache search aarch64-linux
gobjc++-11-aarch64-linux-gnu - GNU Objective-C++ compiler
gobjc++-9-aarch64-linux-gnu - GNU Objective-C++ compiler
gobjc++-aarch64-linux-gnu - GNU Objective-C++ compiler for the arm64 architecture
gobjc-10-aarch64-linux-gnu - GNU Objective-C compiler
gobjc-11-aarch64-linux-gnu - GNU Objective-C compiler
gobjc-9-aarch64-linux-gnu - GNU Objective-C compiler
...

apt-cache search arm-linux
g++-9-arm-linux-gnueabihf - GNU C++ compiler (cross compiler for armhf architecture)
g++-arm-linux-gnueabi - GNU C++ compiler for the armel architecture
gcc-10-arm-linux-gnueabi - GNU C compiler (cross compiler for armel architecture)
gcc-10-arm-linux-gnueabi-base - Pakiet podstawowy Kolekcji Kompilatorów GNU (GCC)
gcc-10-arm-linux-gnueabihf - GNU C compiler (cross compiler for armhf architecture)
gcc-10-arm-linux-gnueabihf-base - Pakiet podstawowy Kolekcji Kompilatorów GNU (GCC)
gcc-10-plugin-dev-arm-linux-gnueabi - Pliki do tworzenia wtyczek GNU GCC
gcc-10-plugin-dev-arm-linux-gnueabihf - Pliki do tworzenia wtyczek GNU GCC
gcc-11-arm-linux-gnueabi - GNU C compiler (cross compiler for armel architecture)
gcc-11-arm-linux-gnueabi-base - Pakiet podstawowy Kolekcji Kompilatorów GNU (GCC)
gcc-11-plugin-dev-arm-linux-gnueabi - Pliki do tworzenia wtyczek GNU GCC
```

But I can also have cross-compilers provided with NDK, e.g.:
```
ls <android-sdk>/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/
aarch64-linux-android21-clang       armv7a-linux-androideabi23-clang    i686-linux-android-strings
aarch64-linux-android21-clang++     armv7a-linux-androideabi23-clang++  i686-linux-android-strip
aarch64-linux-android22-clang       armv7a-linux-androideabi24-clang    ld.lld
aarch64-linux-android22-clang++     armv7a-linux-androideabi24-clang++  lldb-argdumper
aarch64-linux-android23-clang       armv7a-linux-androideabi26-clang    llvm-addr2line
aarch64-linux-android23-clang++     armv7a-linux-androideabi26-clang++  llvm-ar
aarch64-linux-android24-clang       armv7a-linux-androideabi27-clang    llvm-as
aarch64-linux-android24-clang++     armv7a-linux-androideabi27-clang++  llvm-cfi-verify
aarch64-linux-android26-clang       armv7a-linux-androideabi28-clang    llvm-config
aarch64-linux-android26-clang++     armv7a-linux-androideabi28-clang++  llvm-cov
aarch64-linux-android27-clang       armv7a-linux-androideabi29-clang    llvm-dis
aarch64-linux-android27-clang++     armv7a-linux-androideabi29-clang++  llvm-lib
aarch64-linux-android28-clang       armv7a-linux-androideabi30-clang    llvm-link
aarch64-linux-android28-clang++     armv7a-linux-androideabi30-clang++  llvm-modextract
```


Which one should I use for cross-compilation modules in TVM for android device?





---
[Visit Topic](https://discuss.tvm.apache.org/t/which-cross-compiler/12059/1) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/d3f121636ac9fcdd1f0155557ae6c8b26470ffe450884b7ed5e81deefb36c98c).

[Apache TVM Discuss] [Questions] Which cross-compiler?

Posted by Krzysztof Parzyszek via Apache TVM Discuss <no...@discuss.tvm.ai>.

Use the ones from the NDK.  Specifically, in the cmake step, define
- `-DCMAKE_TOOLCHAIN_FILE=<android-sdk>/ndk/21.3.6528147/build/cmake/android.toolchain.cmake`,
- `-DANDROID_ABI` (for example `=arm64-v8a`),
- `-DANDROID_PLATFORM` (for example `=android-28`).





---
[Visit Topic](https://discuss.tvm.apache.org/t/which-cross-compiler/12059/2) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/fa2b2c6f3e06e19db66b6abd33cd791b42d2efcc65e9953ef54bfef71b3da74f).