Skip to content

Commit

Permalink
targets/wasi: remove --export-dynamic linker flag
Browse files Browse the repository at this point in the history
Exporting symbols seems to embed them in the WASM exports section which
causes wasmtime to fail: bytecodealliance/wasmtime#2587
As a workaround, it is possible to specify the `--allow-unknown-exports`
flag on wasmtime.
But as discussed in the above linked issue, this seems to only be a
workaround. For the Rust compiler the fix was to remove the
`--export-dynamic` linker flag when targeting `wasm32-wasi`:
rust-lang/rust#81255
Which is waht this commit does for Tinygo too.
  • Loading branch information
ZauberNerd authored and deadprogram committed Apr 11, 2022
1 parent 6d13883 commit 76ef498
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion targets/wasi.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"ldflags": [
"--allow-undefined",
"--stack-first",
"--export-dynamic",
"--no-demangle"
],
"emulator": ["wasmtime"],
Expand Down

0 comments on commit 76ef498

Please sign in to comment.