Let apps override emscripten settings
Read settings from OLM_OPTIONS to allow apps to configure some options. In particular, this is useful for setting the heap size.
This commit is contained in:
parent
1bf807bf33
commit
51b141ecb6
1 changed files with 10 additions and 2 deletions
|
@ -21,5 +21,13 @@ if (typeof(window) !== 'undefined') {
|
||||||
}
|
}
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var module; // Shadow the Node 'module' object so that emscripten won't try
|
/* applications should define OLM_OPTIONS in the environment to override
|
||||||
// to fiddle with it.
|
* emscripten module settings */
|
||||||
|
var Module = {};
|
||||||
|
if (typeof(OLM_OPTIONS) !== 'undefined') {
|
||||||
|
for (var key in OLM_OPTIONS) {
|
||||||
|
if (OLM_OPTIONS.hasOwnProperty(key)) {
|
||||||
|
Module[key] = OLM_OPTIONS[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue