[llvm-branch-commits] [lldb] [lldb][RISCV] update RISCV target features in disassembler (PR #173047)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 12 18:55:50 PST 2026


daniilavdeev wrote:

> I don't recall having to set a CPU value for other tests. -march was usually enough.

I doubt the issue is related to the CPU value here. In fact, I am not setting it explicitly, `rv64gc` comes directly from the `-march` option.

The real issue is that it is not possible to cross-compile and link a riscv binary without an appropriate riscv toolchain. Given  that the CI is x86 hosted, producing a complete executable would require the platform to have a riscv toolchain available and a compilation command would need to include the toolchain and sysroot paths explicitly:
```
clang --target=riscv64-unknown-linux-gnu -march=rv64gc --gcc-toolchain=<path to riscv toolchain> --sysroot=<path to riscv toolchain>/sysroot -g main.c -o a.out
```

In order to avoid the toolchain requirement entirely, I have switched to using `yaml2obj` to produce the binaries directly from YAML descriptions. This allows the tests to run on all platforms without any riscv toolchain.

https://github.com/llvm/llvm-project/pull/173047


More information about the llvm-branch-commits mailing list