diff options
author | Alon Zakai <azakai@google.com> | 2019-12-12 19:15:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-12 19:15:39 -0800 |
commit | 16c6b44da64630cd6906433cf35edabcea93cffc (patch) | |
tree | f36d41e14f17b64bbfd3f7080cb624565fc11c59 /scripts | |
parent | 89d1cf92be0636a219ee6415eead387241963dcf (diff) | |
download | binaryen-16c6b44da64630cd6906433cf35edabcea93cffc.tar.gz binaryen-16c6b44da64630cd6906433cf35edabcea93cffc.tar.bz2 binaryen-16c6b44da64630cd6906433cf35edabcea93cffc.zip |
Support stack overflow checks in standalone mode (#2525)
In normal mode we call a JS import, but we can't import from JS
in standalone mode. Instead, just trap in that case with an
unreachable. (The error reporting is not as good in this case, but
at least it catches all errors and halts, and the emitted wasm is
valid for standalone mode.)
Helps emscripten-core/emscripten#10019
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/test/lld.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/test/lld.py b/scripts/test/lld.py index f509059de..992a35655 100755 --- a/scripts/test/lld.py +++ b/scripts/test/lld.py @@ -19,14 +19,14 @@ from . import support def args_for_finalize(filename): + ret = ['--global-base=568'] if 'safe_stack' in filename: - return ['--check-stack-overflow', '--global-base=568'] - elif 'shared' in filename: - return ['--side-module'] - elif 'standalone-wasm' in filename: - return ['--standalone-wasm', '--global-base=568'] - else: - return ['--global-base=568'] + ret += ['--check-stack-overflow'] + if 'shared' in filename: + ret += ['--side-module'] + if 'standalone-wasm' in filename: + ret += ['--standalone-wasm'] + return ret def test_wasm_emscripten_finalize(): |