aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-06 11:23:37 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-06 11:23:37 -0800
commitc6cba031d9a745413f082ac9d46fe61d2fc62413 (patch)
tree45856d307507afced47cc289bb4d6dabb0c784ca
parentdd8b36bd9640522a597bc6aeebdfd7966e87cfa1 (diff)
other.test_emcc fixes for fastcomp
-rwxr-xr-xemcc1
-rw-r--r--tests/test_other.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/emcc b/emcc
index e02854bd..bad118cd 100755
--- a/emcc
+++ b/emcc
@@ -1210,6 +1210,7 @@ try:
assert shared.Settings.NAMED_GLOBALS == 0, 'named globals not supported in fastcomp'
assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp'
assert shared.Settings.TARGET_LE32 == 1, 'fastcomp requires le32'
+ assert shared.Settings.USE_TYPED_ARRAYS == 2, 'fastcomp assumes ta2'
assert not bind, 'embind not supported in fastcomp yet'
if jcache:
logging.warning('jcache is not supported in fastcomp (you should not need it anyhow), disabling')
diff --git a/tests/test_other.py b/tests/test_other.py
index 4bdd889b..9c983f9f 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -197,7 +197,7 @@ Options that are modified or new in %s include:
#(['-O2', '-g4'], lambda generated: 'var b=0' not in generated and 'var b = 0' not in generated and 'function _main' in generated, 'same as -g3 for now'),
(['-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' in generated, 'no inlining without opts'),
(['-O3', '-s', 'INLINING_LIMIT=0', '--closure', '0'], lambda generated: 'function _dump' not in generated, 'lto/inlining'),
- (['-Os', '--llvm-lto', '1', '-s', 'ASM_JS=0'], lambda generated: 'function _dump' in generated, '-Os disables inlining'),
+ (['-Os', '--llvm-lto', '1', '-s', 'ASM_JS=0', '-g2'], lambda generated: 'function _dump' in generated, '-Os disables inlining'),
(['-s', 'USE_TYPED_ARRAYS=0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'),
(['-s', 'USE_TYPED_ARRAYS=1'], lambda generated: 'IHEAPU = ' in generated, 'typed arrays 1 selected'),
([], lambda generated: 'Module["_dump"]' not in generated, 'dump is not exported by default'),
@@ -209,6 +209,7 @@ Options that are modified or new in %s include:
]:
print params, text
self.clear()
+ if os.environ.get('EMCC_FAST_COMPILER') == '1' and ['disable typed arrays', 'typed arrays 1 selected']: continue
output = Popen([PYTHON, compiler, path_from_root('tests', 'hello_world_loop.cpp'), '-o', 'a.out.js'] + params, stdout=PIPE, stderr=PIPE).communicate()
assert len(output[0]) == 0, output[0]
assert os.path.exists('a.out.js'), '\n'.join(output)