webassembly
webassembly copied to clipboard
LinkError when enabling compiler optimization
When passing -O
to cli/compiler
I'm getting in the compiled module:
LinkError: WebAssembly Instantiation: Import #3 module="env" function="memset" error: function import requires a callable at <anonymous>
I'm using malloc in my code, the compiler arguments look like this:
let args = [
"-O",
"-q",
"-o", "./wasm_tmp.wasm",
"src/main.c"
];