[Lldb-commits] [PATCH] D32441: Remove the home-grown android toolchain file and all references to it

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 25 00:53:01 PDT 2017


labath marked 2 inline comments as done.
labath added inline comments.


================
Comment at: www/build.html:488-493
+              -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \<br/>
+              -DANDROID_ABI=arm64-v8a \<br/>
+              -DANDROID_PLATFORM=android-21 \<br/>
+              -DANDROID_ALLOW_UNDEFINED_SYMBOLS=On \<br/>
+              -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-android \<br/>
+              -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_C_COMPILER=cc;-DCMAKE_CXX_COMPILER=c++' <br/>
----------------
tberghammer wrote:
> tberghammer wrote:
> > tberghammer wrote:
> > > Can you add some instructions about the supported ANDROID_ABI and LLVM_HOST_TRIPLE pairs? I would find it a bit hard to figure them out on my own (especially the correct triple)
> > Shouldn't we specify LLVM_TARGETS_TO_BUILD as well to reduce the size of the executable?
> Previously we specified LLVM_TARGET_ARCH as well. Is it not needed anymore?
The `LLVM_HOST_TRIPLE` thingy is described in the generic section above as
```                <dd>The triple of the system that lldb (or lldb-server) will run on. Not setting
                this (or setting it incorrectly) can cause a lot of issues with remote debugging
                as a lot of the choices lldb makes depend on the triple reported by the remote
                platform.</dd>
```
LLVM_TARGET_ARCH is computed from the host triple, so it's not necessary if you set the latter properly.

As for TARGETS_TO_BUILD, I chose to omit that as I just want to present a minimal working configuration. If we go the optimization route, then there are many other variables you might want to set (LLVM_BUILD_STATIC, LLVM_USE_LINKER=gold to enable dead stripping, ...), but I don't think that's the purpose of this example.


https://reviews.llvm.org/D32441





More information about the lldb-commits mailing list