diff options
author | Alon Zakai <azakai@google.com> | 2021-03-30 16:50:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 16:50:55 -0700 |
commit | a680b716efe08afd9920269253058a849d6c4286 (patch) | |
tree | 9268b2a903bc60a675c6db537ffa4a3c0cb75df6 /test/passes/set-globals.wast | |
parent | 330f722a4f4ae5288b21954aefa496af5cbc71e7 (diff) | |
download | binaryen-a680b716efe08afd9920269253058a849d6c4286.tar.gz binaryen-a680b716efe08afd9920269253058a849d6c4286.tar.bz2 binaryen-a680b716efe08afd9920269253058a849d6c4286.zip |
SetGlobals pass (#3750)
This allows changing a global's value on the commandline in an easy way.
In some toolchains this is useful as the build can contain a global that
indicates something like a logging level, which this can customize.
Diffstat (limited to 'test/passes/set-globals.wast')
-rw-r--r-- | test/passes/set-globals.wast | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/passes/set-globals.wast b/test/passes/set-globals.wast new file mode 100644 index 000000000..4af112883 --- /dev/null +++ b/test/passes/set-globals.wast @@ -0,0 +1,7 @@ +(module + ;; an imported i32 + (import "env" "in" (global $foo i32)) + + ;; a defined i64 + (global $bar i64 (i64.const 1234)) +) |