aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xemcc3
-rw-r--r--src/postamble.js3
2 files changed, 6 insertions, 0 deletions
diff --git a/emcc b/emcc
index d1d0dea5..5c953f9b 100755
--- a/emcc
+++ b/emcc
@@ -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