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 committed Mar 18, 2022
1 parent ee355dc commit f03949f
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 f03949f

Please sign in to comment.