llvm-project
40fcd251 - [lldb][test] Add support for building Wasm test inferiors (#192872)

Commit
11 days ago
[lldb][test] Add support for building Wasm test inferiors (#192872) This PR adds support for building the test inferiors to WebAssembly. Specifically, it allows you to configure a sysroot and resource dir (pointing at the WASI SDK). The Wasm runtime can be configured through the `LLDB_TEST_USER_ARGS`. ``` LLDB_TEST_TRIPLE:STRING=wasm32-wasip1 LLDB_TEST_SYSROOT:PATH=/path/to/wasi-sdk-32.0-arm64-macos/share/wasi-sysroot LLDB_TEST_RESOURCE_DIR:PATH=/path/to/wasi-sdk-32.0-arm64-macos/lib/clang/22/ LLDB_TEST_USER_ARGS:STRING=--setting;platform.plugin.wasm.runtime-path=/path/to/iwasm;--setting;platform.plugin.wasm.runtime-args=--heap-size=1048576;--setting;platform.plugin.wasm.port-arg=-g= ``` With the configuration listed above I was able to confirm that I could build and run a handful of C and C++ tests. To set expectations: lots of tests are unsupported because they rely on things not available in Wasm (e.g. shared libraries) or they use features currently unsupported in LLDB (most notably: expression evaluation).
Author
Parents
Loading