Emscripten: Memory init file generation is ignored in wasm backend

Created on 2 Mar 2020  路  3Comments  路  Source: emscripten-core/emscripten

emcc tests\hello_world.c --memory-init-file 1 -s USE_PTHREADS=1 -s WASM=1 -o a.html

generated a file a.html.mem in asm.js backend, but does not generate the memory initializer file in wasm backend, the directive --memory-init-file 1 is getting silently ignored.

good first bug help wanted

Most helpful comment

Maybe we should print a warning about the unused option?

All 3 comments

We should document this better, yeah. With wasm we never use a mem init file, as even with pthreads we have passive segments that let us embed them in the binary.

For wasm2js though we do obey that flag.

Maybe we should print a warning about the unused option?

Yes, docs + warning sounds good.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShawZG picture ShawZG  路  4Comments

phraemer picture phraemer  路  3Comments

yahsaves picture yahsaves  路  4Comments

void4 picture void4  路  3Comments

kripken picture kripken  路  4Comments