From 3be78fdd2f8e673457d93f3c7bfb341f8074d298 Mon Sep 17 00:00:00 2001 From: Abbas Mashayekh Date: Mon, 8 Feb 2021 21:30:31 +0330 Subject: Add feature options to wasm-dis (#3548) This will allow .fromBinary tests be executed with the desired featurs so there will be no difference between those tests and .from-wast tests. Fixes #3545 --- src/tools/wasm-dis.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/tools/wasm-dis.cpp') diff --git a/src/tools/wasm-dis.cpp b/src/tools/wasm-dis.cpp index 8220e96cd..6c8edffaf 100644 --- a/src/tools/wasm-dis.cpp +++ b/src/tools/wasm-dis.cpp @@ -19,18 +19,19 @@ // #include "support/colors.h" -#include "support/command-line.h" #include "support/file.h" #include "wasm-io.h" +#include "tool-options.h" + using namespace cashew; using namespace wasm; int main(int argc, const char* argv[]) { std::string sourceMapFilename; - Options options("wasm-dis", - "Un-assemble a .wasm (WebAssembly binary format) into a " - ".wat (WebAssembly text format)"); + ToolOptions options("wasm-dis", + "Un-assemble a .wasm (WebAssembly binary format) into a " + ".wat (WebAssembly text format)"); options .add("--output", "-o", @@ -71,6 +72,8 @@ int main(int argc, const char* argv[]) { Fatal() << "error in parsing wasm source mapping"; } + options.applyFeatures(wasm); + if (options.debug) { std::cerr << "Printing..." << std::endl; } -- cgit v1.2.3