-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmakeEmscripten.bat
6 lines (6 loc) · 2.61 KB
/
makeEmscripten.bat
1
2
3
4
5
6
:: **** use the "-s WASM" switch to compile WebAssembly output. warning: the SINGLE_FILE approach does NOT currently work in Chrome 63.. ****
:: note: SAFE_HEAP=0 makes iOS shit fail - has to be set to 1 for iCrap devices
:: -fsanitize-minimal-runtime -fsanitize=undefined
:: -fsanitize=address
emcc.bat -s WASM=1 -funroll-loops -Os -O3 -s ASSERTIONS=0 -s SAFE_HEAP=0 -s VERBOSE=0 -fno-rtti -fno-exceptions -Wno-pointer-sign --closure 1 --llvm-lto 1 -I./src --memory-init-file 0 -s NO_FILESYSTEM=1 src/loaders.cpp src/filter.cpp src/wavegenerator.cpp src/envelope.cpp src/sid.cpp src/memory.c src/system.cpp src/cpu.c src/hacks.c src/cia.c src/vic.c src/core.cpp src/digi.cpp src/sidplayer.cpp -s EXPORTED_FUNCTIONS="['_loadSidFile', '_playTune', '_getMusicInfo', '_getSampleRate', '_getSoundBuffer', '_getSoundBufferLen', '_computeAudioSamples', '_enableVoices', '_envIsSID6581', '_envSetSID6581', '_envIsNTSC', '_envSetNTSC', '_getBufferVoice1', '_getBufferVoice2', '_getBufferVoice3', '_getBufferVoice4', '_setRegisterSID', '_getRegisterSID', '_getRAM', '_setRAM', '_getDigiType', '_getDigiTypeDesc', '_getDigiRate', '_getNumberTraceStreams', '_getTraceStreams', '_malloc', '_free']" -o htdocs/tinyrsid.js -s SINGLE_FILE=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=['ccall'] -s BINARYEN_ASYNC_COMPILATION=1 -s BINARYEN_TRAP_MODE='clamp' && copy /b shell-pre.js + htdocs\tinyrsid.js + shell-post.js htdocs\tinyrsid3.js && del htdocs\tinyrsid.js && copy /b htdocs\tinyrsid3.js + tinyrsid_adapter.js htdocs\backend_tinyrsid.js && del htdocs\tinyrsid3.js
::emcc.bat -s TOTAL_MEMORY=33554432 -s WASM=0 -s ASSERTIONS=2 -s SAFE_HEAP=1 -s VERBOSE=0 -DDEBUG -fno-rtti -Wno-pointer-sign -I./src --memory-init-file 0 -s NO_FILESYSTEM=1 src/loaders.cpp src/filter.cpp src/envelope.cpp src/sid.cpp src/memory.c src/cpu.c src/hacks.c src/cia.c src/vic.c src/core.cpp src/digi.cpp src/sidplayer.cpp -s EXPORTED_FUNCTIONS="['_loadSidFile', '_playTune', '_getMusicInfo', '_getSampleRate', '_getSoundBuffer', '_getSoundBufferLen', '_computeAudioSamples', '_enableVoices', '_envIsSID6581', '_envSetSID6581', '_envIsNTSC', '_envSetNTSC', '_getBufferVoice1', '_getBufferVoice2', '_getBufferVoice3', '_getBufferVoice4', '_getRegisterSID', '_getRAM', '_setRAM', '_getDigiType', '_getDigiTypeDesc', '_getDigiRate', '_malloc', '_free']" -o htdocs/tinyrsid.js -s SINGLE_FILE=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=['ccall'] -s BINARYEN_ASYNC_COMPILATION=1 -s BINARYEN_TRAP_MODE='clamp' && copy /b shell-pre.js + htdocs\tinyrsid.js + shell-post.js htdocs\tinyrsid3.js && del htdocs\tinyrsid.js && copy /b htdocs\tinyrsid3.js + tinyrsid_adapter.js htdocs\backend_tinyrsid.js && del htdocs\tinyrsid3.js