Open antocuni opened 4 months ago
I believe the correct arg is -Wl,--import-symbols
see https://github.com/ziglang/zig/blob/e5c974fa5cd3f9ed49463b597954a053da91de6d/src/link/Wasm.zig#L3547-L3549
so for you example you could use:
zig cc --target=wasm32-wasi-musl -mexec-model=reactor hello.o -o hello.wasm -Wl,--import-symbols
Thank you, -Wl,--import-symbols
works!
Would be nice to have full compatibility with clang though, so I guess that my bug report is still valid?
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
I have the following
hello.c
:The following command fails
I can make it working by invoking
wasml-ld
directly. This is that I did:Expected Behavior
I expect that
--export-undefined
is passed to the linker.Note that with wasi-sdk, it works out of the box: