summaryrefslogtreecommitdiff
path: root/test/ctor-eval/ignore-external-input.wast.out
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-01-06 15:04:42 -0800
committerGitHub <noreply@github.com>2022-01-06 15:04:42 -0800
commit8c0f53d236f664086405870321e5887aaed39f3f (patch)
treee2d8153967535df252db9c98af584841cf7c5a38 /test/ctor-eval/ignore-external-input.wast.out
parent5049f077ae2d21166dc8ee4c3057bdc48cb3d94c (diff)
downloadbinaryen-8c0f53d236f664086405870321e5887aaed39f3f.tar.gz
binaryen-8c0f53d236f664086405870321e5887aaed39f3f.tar.bz2
binaryen-8c0f53d236f664086405870321e5887aaed39f3f.zip
[ctor-eval] Add --ignore-external-input option (#4428)
This is meant to address one of the main limitations of wasm-ctor-eval in emscripten atm, that libc++ global ctors will read env vars, which means they call an import, which stops us from evalling, emscripten-core/emscripten#15403 (comment) To handle that, this adds an option to ignore external input. When set, we can assume that no env vars will be read, no reading from stdin, no arguments to main(), etc. Perhaps these could each be separate options, but I think keeping it simple for now might be good enough.
Diffstat (limited to 'test/ctor-eval/ignore-external-input.wast.out')
-rw-r--r--test/ctor-eval/ignore-external-input.wast.out17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/ctor-eval/ignore-external-input.wast.out b/test/ctor-eval/ignore-external-input.wast.out
new file mode 100644
index 000000000..f728afd0e
--- /dev/null
+++ b/test/ctor-eval/ignore-external-input.wast.out
@@ -0,0 +1,17 @@
+(module
+ (type $none_=>_i32 (func (result i32)))
+ (type $none_=>_none (func))
+ (import "wasi_snapshot_preview1" "something_else" (func $wasi_something_else (result i32)))
+ (memory $0 256 256)
+ (data (i32.const 24) "aaaa")
+ (export "test3" (func $2))
+ (func $2
+ (drop
+ (call $wasi_something_else)
+ )
+ (i32.store
+ (i32.const 24)
+ (i32.const 100)
+ )
+ )
+)