diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-28 10:33:00 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-28 10:43:13 -0500 |
commit | 8060d8fc693eae4a65ae2efe1ef5ca6cfe3c0636 (patch) | |
tree | 6cb2a751d7898cc4e8dcfede99fcc6ee45d21897 | |
parent | 4b57c3cc7b5abd704b682dc4eb72606088af8344 (diff) |
disable llvm lto except for -O3, due to issues we have been seeing
-rwxr-xr-x | emcc | 7 | ||||
-rwxr-xr-x | tests/runner.py | 6 |
2 files changed, 7 insertions, 6 deletions
@@ -193,6 +193,7 @@ Options that are modified or new in %s include: -s DOUBLE_MODE=0 -s PRECISE_I64_MATH=0 --closure 1 + --llvm-lto 1 This is not recommended at all. A better idea is to try each of these separately on top of @@ -235,8 +236,8 @@ Options that are modified or new in %s include: 2: -O2 LLVM optimizations 3: -O3 LLVM optimizations (default in -O2+) - --llvm-lto <level> 0: No LLVM LTO (default in -O0) - 1: LLVM LTO (default in -O1+) + --llvm-lto <level> 0: No LLVM LTO (default in -O2 and below) + 1: LLVM LTO (default in -O3) Note: If LLVM optimizations are not run (see --llvm-opts), setting this to 1 has no effect. @@ -816,7 +817,7 @@ try: newargs = newargs + [default_cxx_std] if llvm_opts is None: llvm_opts = LLVM_OPT_LEVEL[opt_level] - if llvm_lto is None: llvm_lto = llvm_opts > 0 + if llvm_lto is None: llvm_lto = opt_level >= 3 if opt_level <= 0: keep_llvm_debug = keep_js_debug = True # always keep debug in -O0 if opt_level > 0: keep_llvm_debug = False # JS optimizer wipes out llvm debug info from being visible if closure is None and opt_level == 3: closure = True diff --git a/tests/runner.py b/tests/runner.py index eb7d3c2d..b5f7cd6c 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -8526,7 +8526,7 @@ 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 for params, test, text in [ (['-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' in generated, 'no inlining without opts'), - (['-O1', '-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' not in generated, 'inlining'), + (['-O3', '-s', 'INLINING_LIMIT=0', '--closure', '0'], lambda generated: 'function _dump' not in generated, 'lto/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'), @@ -9479,8 +9479,8 @@ f.close() try: os.environ['EMCC_DEBUG'] = '1' for asm, linkable, chunks, js_chunks in [ - (0, 0, 2, 2), (0, 1, 4, 4), - (1, 0, 2, 2), (1, 1, 4, 5) + (0, 0, 3, 2), (0, 1, 4, 4), + (1, 0, 3, 2), (1, 1, 4, 5) ]: print asm, linkable, chunks, js_chunks output, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_libcxx.cpp'), '-O1', '-s', 'LINKABLE=%d' % linkable, '-s', 'ASM_JS=%d' % asm], stdout=PIPE, stderr=PIPE).communicate() |