aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xemcc2
-rw-r--r--src/jsifier.js2
-rwxr-xr-xtests/runner.py7
3 files changed, 7 insertions, 4 deletions
diff --git a/emcc b/emcc
index 1d285cbb..df6e649f 100755
--- a/emcc
+++ b/emcc
@@ -721,7 +721,7 @@ try:
bind = False
jcache = False
save_bc = False
- memory_init_file = False # XXX TODO True
+ memory_init_file = True
if use_cxx:
default_cxx_std = '-std=c++03' # Enforce a consistent C++ standard when compiling .cpp files, if user does not specify one on the cmdline.
diff --git a/src/jsifier.js b/src/jsifier.js
index 50030268..2a9c5ba8 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1525,7 +1525,7 @@ function JSify(data, functionsOnly, givenFunctions) {
// write out the singleton big memory initialization value
print('/* memory initializer */ ' + makePointer(memoryInitialization, null, 'ALLOC_NONE', 'i8', 'TOTAL_STACK', true)); // we assert on TOTAL_STACK == GLOBAL_BASE
} else {
- print('/* memory initializer */'); // test purposes
+ print('/* no memory initializer */'); // test purposes
}
}
diff --git a/tests/runner.py b/tests/runner.py
index 1965cad9..2ce08ddd 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -266,12 +266,15 @@ process(sys.argv[1])
if output_processor is not None:
output_processor(open(filename + '.o.js').read())
- if 0:# XXX TODO self.emcc_args is not None:
+ if self.emcc_args is not None:
if '--memory-init-file' in self.emcc_args:
memory_init_file = int(self.emcc_args[self.emcc_args.index('--memory-init-file')+1])
else:
memory_init_file = 1
- assert ('/* memory initializer */' in open(filename + '.o.js').read()) == (not memory_init_file)
+ if memory_init_file:
+ assert '/* memory initializer */' not in open(filename + '.o.js').read()
+ else:
+ assert 'memory initializer */' in open(filename + '.o.js').read()
def run_generated_code(self, engine, filename, args=[], check_timeout=True, output_nicerizer=None):
stdout = os.path.join(self.get_dir(), 'stdout') # use files, as PIPE can get too full and hang us