aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-12 16:53:09 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-12 16:53:09 -0800
commit011d5e363105562c65d28be962a21d6e4dc2e411 (patch)
treefb64d3c783d8b6fc5b5fb50b891871bb5a8020b2
parent8d7e09462e4f4c5fa10725d4b04caa7be5778749 (diff)
relooper warning in emcc
-rwxr-xr-xemcc1
-rw-r--r--tests/runner.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/emcc b/emcc
index c76dc82d..cd881eb4 100755
--- a/emcc
+++ b/emcc
@@ -306,6 +306,7 @@ elif use_compiler:
shared.Settings.ASSERTIONS = 0
if opt_level >= 2:
shared.Settings.RELOOP = 1
+ print >> sys.stderr, 'Warning: The relooper optimization can be very slow.'
if opt_level >= 3:
shared.Settings.CORRECT_SIGNS = 0
shared.Settings.CORRECT_OVERFLOWS = 0
diff --git a/tests/runner.py b/tests/runner.py
index 0ac04314..72e90e26 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -4948,6 +4948,7 @@ JavaScript in the final linking stage of building.
stdout=PIPE, stderr=PIPE).communicate(input)
assert len(output[0]) == 0, output[0]
assert os.path.exists('something.js'), '\n'.join(output)
+ assert ('Warning: The relooper optimization can be very slow.' in output[1]) == (opt_level >= 2), 'relooper warning should appear in opt >= 2'
self.assertContained('hello, world!', run_js('something.js'))
# Verify optimization level in the generated code