diff options
author | Joel Dice <joel.dice@fermyon.com> | 2023-06-26 10:25:45 -0700 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2023-06-26 10:31:40 -0700 |
commit | 55e199a2c9f4b218499733d60129deffa0a025fe (patch) | |
tree | 5e5f12bdc867454c2dd186cb68d62f5435fa646f /lldb/source/Commands/CommandObjectLog.cpp | |
parent | 64ca650cf9f180cc0b68c0005639028084066e10 (diff) | |
download | llvm-55e199a2c9f4b218499733d60129deffa0a025fe.zip llvm-55e199a2c9f4b218499733d60129deffa0a025fe.tar.gz llvm-55e199a2c9f4b218499733d60129deffa0a025fe.tar.bz2 |
[clang][WebAssembly] Support wasm32-wasi shared libraries
This adds support for Emscripten-style shared libraries [1] to
non-emscripten targets, such as `wasm32-wasi`. Previously, only static
linking was supported, and the `-shared` and `-fPIC` flags were simply
ignored. Now both flags are honored.
Since WASI runtimes do not necessarily include JavaScript support, we
cannot rely on the JS-based Emscripten linker to link shared libraries.
Instead, we link them using the Component Model proposal [2].
We have prototyped shared library support in `wasi-sdk` [3] and put
together a demo [4] which uses a patched version of `wit-component` [5]
to link libraries using the Component Model. We plan to submit the
required changes upstream to the respective repositories in the next
week or two.
[1] https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md
[2] https://github.com/WebAssembly/component-model/blob/main/design/mvp/examples/SharedEverythingDynamicLinking.md
[3] https://github.com/dicej/wasi-sdk/tree/dynamic-linking
[4] https://github.com/dicej/component-linking-demo
[5] https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wit-component
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Reviewed By: sbc100
Differential Revision: https://reviews.llvm.org/D153293
Diffstat (limited to 'lldb/source/Commands/CommandObjectLog.cpp')
0 files changed, 0 insertions, 0 deletions