Mercurial > hg > piper-vamp-js
comparison Makefile.example.emscripten @ 5:7826fe343733
Force Emscripten to emit the static memory init code inside the JS file.
- Emscripten emits it into a separate .mem file for optimised builds, as of 1.12.1
- The file is loaded asyncronously, so occasionally the runtime hadn't initialised before trying to call functions (happened in Chrome, similar to what we've seen before)
- This is the easiest fix, without changing the JS for this simple example.
author | Lucas Thompson <lucas.thompson@qmul.ac.uk> |
---|---|
date | Wed, 24 Aug 2016 14:18:08 +0100 |
parents | 3a5a6535d50d |
children | 820704540560 2a4685f230ac |
comparison
equal
deleted
inserted
replaced
4:3a5a6535d50d | 5:7826fe343733 |
---|---|
28 | 28 |
29 OTHER_SOURCES := \ | 29 OTHER_SOURCES := \ |
30 ../json/json11/json11.cpp | 30 ../json/json11/json11.cpp |
31 | 31 |
32 EMFLAGS := \ | 32 EMFLAGS := \ |
33 --memory-init-file 0 \ | |
33 -s NO_FILESYSTEM=1 \ | 34 -s NO_FILESYSTEM=1 \ |
34 -s MODULARIZE=1 \ | 35 -s MODULARIZE=1 \ |
35 -s ERROR_ON_UNDEFINED_SYMBOLS=1 \ | 36 -s ERROR_ON_UNDEFINED_SYMBOLS=1 \ |
36 -s DISABLE_EXCEPTION_CATCHING=0 \ | 37 -s DISABLE_EXCEPTION_CATCHING=0 \ |
37 -s EXPORT_NAME="'ExampleModule'" \ | 38 -s EXPORT_NAME="'ExampleModule'" \ |