summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-04-22 16:23:15 -0700
committerGitHub <noreply@github.com>2020-04-22 16:23:15 -0700
commit127d9b4a898a19aa626a5c2418573eea69af7ed6 (patch)
tree8782e063aa072ac04055a5fe0104bb15d9e555e6 /src
parentf419cb797b740e5a1ced7104defa4caf697a4574 (diff)
downloadbinaryen-127d9b4a898a19aa626a5c2418573eea69af7ed6.tar.gz
binaryen-127d9b4a898a19aa626a5c2418573eea69af7ed6.tar.bz2
binaryen-127d9b4a898a19aa626a5c2418573eea69af7ed6.zip
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.)
Diffstat (limited to 'src')
-rw-r--r--src/tools/wasm-reduce.cpp3
1 files changed, 3 insertions, 0 deletions
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";
}