From 4d81752204fede13d6513def4195aabe66c5586f Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Tue, 16 Apr 2019 16:47:50 -0700 Subject: Change default feature set to MVP (#1993) In the absence of the target features section or command line flags. When there are command line flags, it is an error if they do not exactly match the target features section, except if --detect-features has been provided. Also adds a --print-features pass to print the command line flags for all enabled options and uses it to make the feature tests more rigorous. --- src/tools/wasm-reduce.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/tools/wasm-reduce.cpp') diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 1f58da0d5..e064abbcb 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -271,7 +271,9 @@ struct Reducer : public WalkerPass(*module); setModule(module.get()); } @@ -999,7 +1002,9 @@ int main(int argc, const char* argv[]) { std::cerr << "|checking that command has expected behavior on canonicalized (read-written) binary\n"; { // read and write it - auto cmd = Path::getBinaryenBinaryTool("wasm-opt") + " " + input + " -o " + test; + // TODO(tlively): -all should be replaced with an option to use the existing + // feature set, once implemented. + auto cmd = Path::getBinaryenBinaryTool("wasm-opt") + " " + input + " -all -o " + test; if (!binary) cmd += " -S"; ProgramResult readWrite(cmd); if (readWrite.failed()) { -- cgit v1.2.3