add testing for asm_js minification/registerization
This commit is contained in:
Родитель
e2c783622d
Коммит
48d96fcb64
|
@ -8715,8 +8715,9 @@ Options that are modified or new in %s include:
|
||||||
|
|
||||||
# emcc -s RELOOP=1 src.cpp ==> should pass -s to emscripten.py. --typed-arrays is a convenient alias for -s USE_TYPED_ARRAYS
|
# emcc -s RELOOP=1 src.cpp ==> should pass -s to emscripten.py. --typed-arrays is a convenient alias for -s USE_TYPED_ARRAYS
|
||||||
for params, test, text in [
|
for params, test, text in [
|
||||||
(['-s', 'ASM_JS=1', '-O2'], lambda generated: 'var i1=0' in generated, 'registerize is run by default in -O2'),
|
(['-s', 'ASM_JS=1', '-O2'], lambda generated: 'var i1=0' in generated and not 'function _main' in generated, 'registerize/minify is run by default in -O2'),
|
||||||
(['-s', 'ASM_JS=1', '-O2', '-g'], lambda generated: 'var i1=0' not in generated, 'registerize is cancelled by -g'),
|
(['-s', 'ASM_JS=1', '-O2', '--minify', '0'], lambda generated: 'var i1 = 0' in generated and not 'function _main' in generated, 'minify is cancelled, but not registerize'),
|
||||||
|
(['-s', 'ASM_JS=1', '-O2', '-g'], lambda generated: 'var i1=0' not in generated and 'var i1 = 0' not in generated and 'function _main' in generated, 'registerize/minify is cancelled by -g'),
|
||||||
(['-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' in generated, 'no inlining without opts'),
|
(['-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'),
|
(['-O3', '-s', 'INLINING_LIMIT=0', '--closure', '0'], lambda generated: 'function _dump' not in generated, 'lto/inlining'),
|
||||||
(['-Os', '--llvm-lto', '1'], lambda generated: 'function _dump' in generated, '-Os disables inlining'),
|
(['-Os', '--llvm-lto', '1'], lambda generated: 'function _dump' in generated, '-Os disables inlining'),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче