Sam Clegg
Sam Clegg
So in the release build `__cxa_end_catch` is no being imported so we assume we don't need to export `setThrew`. But someone the invoke_xx function is still being imported anyway. This...
Do you know which source file resulted in `libremglk_capi.a(remglk_capi-27bf10718c25cc09.remglk_capi.a6cdab8c84f2a7db-cgu.00.rcgu.o)`? What settings were used (`-s` flags) when it was compiled?
So the only place the invoke_ wrappers are ever generated is during the `WebAssemblyLowerEmscriptenEHSjLj` pass. See https://github.com/llvm/llvm-project/blob/5e22a536981483d8411266dccee2ff3e5f31f4a1/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp#L509 Somehow with C++ EH and with setjmp/longjmp these always get generated alongside calls...
My guess is that rust is generating invokes but without the corresponding catches that call `__cxa_end_catch`? While we should fix this... I also wonder if we can find a way...
You can just do `-sEXPORTED_FUNCTIONS=_main,_setThrew` We are trying to find a way to make additive settings work: https://github.com/emscripten-core/emscripten/pull/19938
> @sbc100 Do you think we can add `setThrew` to `EXPORTED_FUNCTIONS` (or `DEFAULT_LIBRARY_FUNCS_TO_INCLUDE`, I don't really know what the difference between the two) whenever `DISABLE_EXCEPTION_CATCHING` is false, in `emcc.py`? This...
I'm not sure we have ever officially support doing this kind of thing. We have had others ask about it in the past though so there are at least few...
> I see. That would be great if you decide to support this. I think that being able to establish the communication between workers is quite important. Do you know...
> do the thread communication on the C++ side. Yes, I would recommend doing your thread communication using the pthread APIs (or C++ thread APIs) and shared memory.
Yes, I can see that in that case you would need to use postMessage. @juj doesn't this sounds like a reasonable use case for postMessage or is there some way...