WebAssembly-benchmark
WebAssembly-benchmark copied to clipboard
Optimizer removes malloc/free
Thanks a lot for putting this test together, it is very useful. I guess emcc evolves as it started eliminating functions from generated module. To have tests function properly I had to export _malloc, _free, ccall and cwrap:
emcc imageConvolute.c -Os -s WASM=1 -s MODULARIZE=1 -s DEMANGLE_SUPPORT=1 -s ALLOW_MEMORY_GROWTH=1 -s "EXPORTED_FUNCTIONS=['_imageConvolute','_malloc','_free']" -o imageConvolute.js -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall', 'cwrap']"