emscripten icon indicating copy to clipboard operation
emscripten copied to clipboard

Disable assertions in tsgen

Open stephenduong1004 opened this issue 2 months ago • 2 comments

When using tsgen with -sASYNCIFY=1 and assertions enabled, an assertion failure occurs: Assertion failed: missing Wasm export: asyncify_start_unwind. This is due to https://github.com/emscripten-core/emscripten/pull/25541.

This PR disables assertions when running tsgen to resolve the issue.

stephenduong1004 avatar Nov 11 '25 23:11 stephenduong1004

@brendandahl do you know why this is needed?

We run tsgen before the wasm-opt asyncify pass so the asyncify functions haven't been created yet.

brendandahl avatar Nov 11 '25 23:11 brendandahl

Yeah, basically the wasm isn't fully generated yet... disabling assertions fixes asserts that expect those contents, but I wonder if we might hit other issues later. If so, for Asyncify at least, we'd need to run it before tsgen somehow...

kripken avatar Nov 11 '25 23:11 kripken