From 127d9b4a898a19aa626a5c2418573eea69af7ed6 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 22 Apr 2020 16:23:15 -0700 Subject: Emit text in pass reduction when in text mode (#2792) Without this we emitted a binary, which confused the size comparisons. (When reducing a smaller size is usually a good sign. And also it provides a deterministic way to know when to stop - we can't infinite loop if we keep going while the size shrinks.) --- src/tools/wasm-reduce.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tools/wasm-reduce.cpp') diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 675d5a025..6e6762099 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -288,6 +288,9 @@ struct Reducer if (debugInfo) { currCommand += " -g "; } + if (!binary) { + currCommand += " -S "; + } if (verbose) { std::cerr << "| trying pass command: " << currCommand << "\n"; } -- cgit v1.2.3