Reduce binary size to ~1MB

- Recompiled main.cpp with -s WASM=1
- Recompiled FFTW with O3 flag
This commit is contained in:
Georgi Gerganov
2018-05-21 18:48:39 +03:00
parent 14cf221875
commit f1aad28b21
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
echo "static const char * BUILD_TIMESTAMP=\"`date`\";" > build_timestamp.h
em++ -Wall -Wextra -O3 -std=c++11 -s USE_SDL=2 ./main.cpp -o wave.js -I ./fftw-3.3.3/api ./lib/libfftw3f.a \
em++ -Wall -Wextra -O3 -std=c++11 -s USE_SDL=2 -s WASM=1 ./main.cpp -o wave.js -I ./fftw-3.3.3/api ./lib/libfftw3f.a \
-s EXPORTED_FUNCTIONS='["_getText", "_getSampleRate", "_setText", "_getAverageRxTime_ms", "_setParameters",
"_getFramesLeftToRecord", "_getFramesToRecord",
"_getFramesLeftToAnalyze", "_getFramesToAnalyze",