[Lldb-commits] [lldb] [llvm] [lldb] Extended if conditions to support alias names for registers (PR #124475)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 7 02:19:06 PST 2025
DavidSpickett wrote:
> FYI, it wanted to link the X86's libxml2 with RISCV which didn't work.
This is known, from the cross building doc:
```
If you find that CMake is finding a version of an optional dependency that for whatever reason doesn’t work, consider simply disabling it if you don’t know that you need it.
```
But...
> Also the CMake flag for disabling libxml2 didn't work for me.
That should have been the workaround for you. =OFF should stop CMake looking for it at all. It might be solved by completely cleaning the build directory, but equally we could be caching the variable incorrectly.
If you are on Ubuntu/Debian, you can install the multiarch packages for these things. I did this to test s390x in the past.
> The last piece of the puzzle is not working for me because it tells me that there are no matching tests. Could you tell me how to do this?
Sorry, I forgot that this is a shell test not an API test. I'm not sure if you can run those using dotest, normally on host you'd use llvm-lit for them like:
```
./bin/llvm-lit ../llvm-project/..../test_file
```
That might work, but if not, they will be run from `ninja check-lldb-shell`.
Either way you'll need to set the variables shown in the note at the bottom of https://lldb.llvm.org/resources/test.html#running-the-test-suite-remotely.
The bot I linked to does this:
```
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_FLAGS=-D__OPTIMIZE__ -DLLVM_TARGETS_TO_BUILD=AArch64 -DLLVM_TARGET_TRIPLE=aarch64-unknown-linux-gnu -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_PARALLEL_LINK_JOBS=8 -DCLANG_DEFAULT_LINKER=lld '-DLLVM_LIT_ARGS=-v -vv --threads=8 --time-tests' -DTOOLCHAIN_TARGET_TRIPLE=aarch64-unknown-linux-gnu -DTOOLCHAIN_TARGET_COMPILER_FLAGS=-mcpu=cortex-a78 -DTOOLCHAIN_TARGET_SYSROOTFS=/mnt/fs/jetson-agx-ubuntu -DLIBCXX_ABI_VERSION=1 -DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF -DLLDB_TEST_ARCH=aarch64 -DLLDB_TEST_COMPILER=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang -DLLDB_TEST_PLATFORM_URL=connect://jetson-agx-2198.lab.llvm.org:1234 -DLLDB_TEST_PLATFORM_WORKING_DIR=/home/ubuntu/lldb-tests -DLLDB_TEST_SYSROOT=/mnt/fs/jetson-agx-ubuntu -DLLDB_ENABLE_PYTHON=ON -DLLDB_ENABLE_SWIG=ON -DLLDB_ENABLE_LIBEDIT=OFF -DLLDB_ENABLE_CURSES=OFF -DLLDB_ENABLE_LZMA=OFF -DLLDB_ENABLE_LIBXML2=OFF -DLLDB_CAN_USE_LLDB_SERVER=OFF '-DLLDB_TEST_USER_ARGS=--env;ARCH_CFLAGS=-mcpu=cortex-a78;--platform-name;remote-linux;--skip-category=lldb-server' '-DLLVM_ENABLE_PROJECTS=clang;lld;lldb;llvm' -DCMAKE_INSTALL_PREFIX=../native -DLLVM_ENABLE_ASSERTIONS=ON -C ../llvm-project/clang/cmake/caches/CrossWinToARMLinux.cmake ../llvm-project/llvm
```
**-DLLDB_TEST_SYSROOT=/mnt/fs/jetson-agx-ubuntu**
Sysroots are typically the parent folder of the compiler binaries, if it's a separate download, not sure what it will be if it's an apt installed version. Perhaps `/usr/something/riscv64....`.
...also side note if you do manage to get `check-llvm` working remotely it would be great to see what the state of the test suite is so we can set expectations for future contributors (in the absence of regular bots).
If you don't give up after slogging through all these steps that is :) Thanks for sticking with us.
https://github.com/llvm/llvm-project/pull/124475
More information about the lldb-commits
mailing list