webassembly icon indicating copy to clipboard operation
webassembly copied to clipboard

LinkError when enabling compiler optimization

Open maierfelix opened this issue 7 years ago • 0 comments

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"
];

maierfelix avatar Sep 25 '17 18:09 maierfelix