aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-05 16:59:27 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-05 16:59:27 -0700
commit74577f85173e2820658c3fa400da4c70c8138589 (patch)
tree0be2844b8655edc945c038f59500e0af50d23c8c
parentdc2a01d7f459dab9bf431fee51a10a5aa297bedc (diff)
load memory initializer immediately
-rwxr-xr-xemcc2
1 files changed, 1 insertions, 1 deletions
diff --git a/emcc b/emcc
index 07aa15b3..e43199f3 100755
--- a/emcc
+++ b/emcc
@@ -1447,7 +1447,7 @@ try:
if DEBUG:
# Copy into temp dir as well, so can be run there too
shutil.copyfile(memfile, os.path.join(shared.EMSCRIPTEN_TEMP_DIR, os.path.basename(memfile)))
- return 'addPreRun(function() { loadMemoryInitializer("%s") });' % os.path.basename(memfile)
+ return 'loadMemoryInitializer("%s");' % os.path.basename(memfile)
src = re.sub('/\* memory initializer \*/ allocate\(\[([\d,]+)\], "i8", ALLOC_NONE, TOTAL_STACK\)', repl, src, count=1)
open(final + '.mem.js', 'w').write(src)
final += '.mem.js'