diff options
author | Alon Zakai <azakai@google.com> | 2019-09-18 15:11:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-18 15:11:44 -0700 |
commit | 159e9a45877351f89af8ec0a05a7b3fe57d34aad (patch) | |
tree | b427fda2f848aa159380ac75f85d4644ecc9c33e /test/lld/standalone-wasm.wast | |
parent | 844998f1b4f4b0f439875e6b36bc6b821be87939 (diff) | |
download | binaryen-159e9a45877351f89af8ec0a05a7b3fe57d34aad.tar.gz binaryen-159e9a45877351f89af8ec0a05a7b3fe57d34aad.tar.bz2 binaryen-159e9a45877351f89af8ec0a05a7b3fe57d34aad.zip |
Add a --standalone-wasm flag to wasm-emscripten-finalize (#2333)
The flag indicates that we want to run the wasm by itself, without JS support. In that case we don't emit JS dynCalls etc., and we also emit a wasi _start if there is a main, i.e., we try to use the current conventions in the wasm-only space.
Diffstat (limited to 'test/lld/standalone-wasm.wast')
-rw-r--r-- | test/lld/standalone-wasm.wast | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lld/standalone-wasm.wast b/test/lld/standalone-wasm.wast new file mode 100644 index 000000000..2ccbf3f29 --- /dev/null +++ b/test/lld/standalone-wasm.wast @@ -0,0 +1,20 @@ +(module + (memory $0 2) + (table $0 1 1 funcref) + (elem (i32.const 0) $foo) + (global $global$0 (mut i32) (i32.const 66112)) + (global $global$1 i32 (i32.const 66112)) + (global $global$2 i32 (i32.const 576)) + (export "memory" (memory $0)) + (export "main" (func $main)) + (export "__heap_base" (global $global$1)) + (export "__data_end" (global $global$2)) + (func $__original_main (result i32) + (nop) + ) + (func $main (param $0 i32) (param $1 i32) (result i32) + (call $__original_main) + ) + (func $foo (result i32)) +) + |