Skip to content

Commit c6cba03

Browse files
committed
other.test_emcc fixes for fastcomp
1 parent dd8b36b commit c6cba03

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

emcc

+1
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,7 @@ try:
12101210
assert shared.Settings.NAMED_GLOBALS == 0, 'named globals not supported in fastcomp'
12111211
assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp'
12121212
assert shared.Settings.TARGET_LE32 == 1, 'fastcomp requires le32'
1213+
assert shared.Settings.USE_TYPED_ARRAYS == 2, 'fastcomp assumes ta2'
12131214
assert not bind, 'embind not supported in fastcomp yet'
12141215
if jcache:
12151216
logging.warning('jcache is not supported in fastcomp (you should not need it anyhow), disabling')

tests/test_other.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def test_emcc(self):
197197
#(['-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'),
198198
(['-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' in generated, 'no inlining without opts'),
199199
(['-O3', '-s', 'INLINING_LIMIT=0', '--closure', '0'], lambda generated: 'function _dump' not in generated, 'lto/inlining'),
200-
(['-Os', '--llvm-lto', '1', '-s', 'ASM_JS=0'], lambda generated: 'function _dump' in generated, '-Os disables inlining'),
200+
(['-Os', '--llvm-lto', '1', '-s', 'ASM_JS=0', '-g2'], lambda generated: 'function _dump' in generated, '-Os disables inlining'),
201201
(['-s', 'USE_TYPED_ARRAYS=0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'),
202202
(['-s', 'USE_TYPED_ARRAYS=1'], lambda generated: 'IHEAPU = ' in generated, 'typed arrays 1 selected'),
203203
([], lambda generated: 'Module["_dump"]' not in generated, 'dump is not exported by default'),
@@ -209,6 +209,7 @@ def test_emcc(self):
209209
]:
210210
print params, text
211211
self.clear()
212+
if os.environ.get('EMCC_FAST_COMPILER') == '1' and ['disable typed arrays', 'typed arrays 1 selected']: continue
212213
output = Popen([PYTHON, compiler, path_from_root('tests', 'hello_world_loop.cpp'), '-o', 'a.out.js'] + params, stdout=PIPE, stderr=PIPE).communicate()
213214
assert len(output[0]) == 0, output[0]
214215
assert os.path.exists('a.out.js'), '\n'.join(output)

0 commit comments

Comments
 (0)