summaryrefslogtreecommitdiff
path: root/src/tools/wasm-opt.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-04-24 14:51:43 -0700
committerGitHub <noreply@github.com>2024-04-24 14:51:43 -0700
commit2e7e9ddcef219a2a1124dfb7f7009602c42084df (patch)
tree10bf033aa324c7997314eec33adbd88c425d7e3a /src/tools/wasm-opt.cpp
parent39c9baf2c525d962a99183672a080147ef2e567c (diff)
downloadbinaryen-2e7e9ddcef219a2a1124dfb7f7009602c42084df.tar.gz
binaryen-2e7e9ddcef219a2a1124dfb7f7009602c42084df.tar.bz2
binaryen-2e7e9ddcef219a2a1124dfb7f7009602c42084df.zip
Add a flag to opt in to the old WAT parser (#6536)
This flag is intended to help users gracefully migrate to the new wat parser. It will be removed again not too long after the new wat parser is enabled by default in wasm-opt.
Diffstat (limited to 'src/tools/wasm-opt.cpp')
-rw-r--r--src/tools/wasm-opt.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/wasm-opt.cpp b/src/tools/wasm-opt.cpp
index 54a83d15a..32f9f1aad 100644
--- a/src/tools/wasm-opt.cpp
+++ b/src/tools/wasm-opt.cpp
@@ -220,6 +220,13 @@ int main(int argc, const char* argv[]) {
[&outputSourceMapUrl](Options* o, const std::string& argument) {
outputSourceMapUrl = argument;
})
+ .add(
+ "--deprecated-wat-parser",
+ "",
+ "Use the old, deprecated WAT parser. This option will be removed soon!",
+ WasmOptOption,
+ Options::Arguments::Zero,
+ [](Options*, const std::string&) { useNewWATParser = false; })
.add("--new-wat-parser",
"",
"Use the experimental new WAT parser",