diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-07-21 16:29:23 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-07-21 16:29:23 -0700 |
commit | 7e9e2436a5f9c56dbbd79b9cb04f63874b4c7150 (patch) | |
tree | f557c84bbaeac1a58ba1a4ef1fc35db8be81adaa | |
parent | 18789e196dd97d6076b5b2071e52f2b25253c200 (diff) |
Module.memoryInitializerPrefixURL option; #2542
-rwxr-xr-x | emcc | 3 | ||||
-rw-r--r-- | src/postamble.js | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -510,6 +510,9 @@ Options that are modified or new in %s include: Note the .mem file should be in the same directory as the .js file when the code is run. + If you want it to be in a different directory, + you can define Module.memoryInitializerPrefixURL + which will be used as a prefix. -Wno-warn-absolute-paths If not specified, the compiler will warn about any uses of absolute paths in -I and -L command line diff --git a/src/postamble.js b/src/postamble.js index 085dee69..cd2060fd 100644 --- a/src/postamble.js +++ b/src/postamble.js @@ -2,6 +2,9 @@ // === Auto-generated postamble setup entry stuff === if (memoryInitializer) { + if (Module['memoryInitializerPrefixURL']) { + memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer; + } if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { var data = Module['readBinary'](memoryInitializer); #if USE_TYPED_ARRAYS == 2 |