diff options
Diffstat (limited to 'scripts/src/main.lua')
-rw-r--r-- | scripts/src/main.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/src/main.lua b/scripts/src/main.lua index 7f24d684a2a..2d233eba87a 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -85,6 +85,11 @@ end configuration { "asmjs" } targetextension ".bc" + if os.getenv("EMSCRIPTEN") then + postbuildcommands { + os.getenv("EMSCRIPTEN") .. "/emcc -O3 -s DISABLE_EXCEPTION_CATCHING=2 -s USE_SDL=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]' -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\" $(TARGET) -o " .. MAME_DIR .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --post-js " .. MAME_DIR .. "src/osd/sdl/emscripten_post.js", + } + end configuration { } |