dcodeIO / webassembly

A minimal toolkit and runtime to produce and run WebAssembly modules.
Other
816 stars 31 forks source link

LinkError when enabling compiler optimization #15

Open maierfelix opened 7 years ago

maierfelix commented 7 years ago

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