Improved Emscripten / WASI autodetection

This commit is contained in:
Syrus
2019-09-22 18:23:22 -07:00
parent bafd318284
commit 9942d3ae98
6 changed files with 16 additions and 13 deletions

View File

@ -24,7 +24,9 @@ pub fn is_emscripten_module(module: &Module) -> bool {
.namespace_table
.get(import_name.namespace_index);
let field = module.info().name_table.get(import_name.name_index);
if (field == "_emscripten_memcpy_big" || field == "emscripten_memcpy_big")
if (field == "_emscripten_memcpy_big"
|| field == "emscripten_memcpy_big"
|| field == "__map_file")
&& namespace == "env"
{
return true;