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

hcomere picture hcomere  路  3Comments

nerddan picture nerddan  路  4Comments

jcfr picture jcfr  路  4Comments

answer1103 picture answer1103  路  4Comments

rpellerin picture rpellerin  路  3Comments