aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xemcc2
-rw-r--r--tests/test_core.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/emcc b/emcc
index 0dfa5d86..20f04dd1 100755
--- a/emcc
+++ b/emcc
@@ -1694,7 +1694,7 @@ try:
logging.debug('wrote memory initialization to %s', memfile)
else:
logging.debug('did not see memory initialization')
- elif shared.Settings.USE_TYPED_ARRAYS == 2 and not shared.Settings.MAIN_MODULE and not shared.Settings.SIDE_MODULE:
+ elif shared.Settings.USE_TYPED_ARRAYS == 2 and not shared.Settings.MAIN_MODULE and not shared.Settings.SIDE_MODULE and debug_level < 4:
# not writing a binary init, but we can at least optimize them by splitting them up
src = open(final).read()
src = shared.JS.optimize_initializer(src)
diff --git a/tests/test_core.py b/tests/test_core.py
index b9057f4e..0ec0320e 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -6386,10 +6386,15 @@ def process(filename):
if (i < 10) throw i; // line 5
}
+ #include <iostream>
+ #include <string>
+
int main() {
+ std::string x = "ok"; // add libc++ stuff to make this big, test for #2410
int i;
scanf("%d", &i);
foo(i);
+ std::cout << x << std::endl;
return 0;
}
'''