wasm2cil icon indicating copy to clipboard operation
wasm2cil copied to clipboard

Exports are not used

Open CryZe opened this issue 6 years ago • 2 comments

It seems like the compiler completely ignores the exports section, leading to quite a lot of functions missing in my code. This is because they actually have the same function body and LLVM (or the linker, not sure) deduplicates them. However that single remaining function is then exported with both names to the user. wasm2cil does not look at the export section at all it seems and simply exports all functions with their internal name, leading to one or more of my functions missing each.

CryZe avatar May 25 '19 20:05 CryZe

I kind of hacked something together. It's not clean, but I guess I can open a PR for it later. I have some other PRs coming up too.

CryZe avatar May 27 '19 09:05 CryZe

During development, I often run things in this "mode", ignoring the exports section and pretending that everything is exported with its internal name.

But yes, to actually use wasm2cil, that behavior is incorrect.

ericsink avatar May 28 '19 00:05 ericsink