From 74577f85173e2820658c3fa400da4c70c8138589 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 5 Apr 2013 16:59:27 -0700 Subject: [PATCH] load memory initializer immediately --- emcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emcc b/emcc index 07aa15b3e..e43199f37 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'