summaryrefslogtreecommitdiff
path: root/src/tools/wasm-reduce.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wasm-reduce.cpp')
-rw-r--r--src/tools/wasm-reduce.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp
index da6f4fa6e..784c11942 100644
--- a/src/tools/wasm-reduce.cpp
+++ b/src/tools/wasm-reduce.cpp
@@ -30,6 +30,7 @@
#include "pass.h"
#include "support/command-line.h"
#include "support/file.h"
+#include "support/path.h"
#include "wasm-io.h"
#include "wasm-builder.h"
#include "ir/literal-utils.h"
@@ -137,7 +138,7 @@ struct Reducer : public WalkerPass<PostWalker<Reducer, UnifiedExpressionVisitor<
// try both combining with a generic shrink (so minor pass overhead is compensated for), and without
for (auto shrinking : { false, true }) {
for (auto pass : passes) {
- std::string currCommand = "bin/wasm-opt ";
+ std::string currCommand = Path::getBinaryenBinaryTool("wasm-opt") + " ";
if (shrinking) currCommand += " --dce --vacuum ";
currCommand += working + " -o " + test + " " + pass;
if (debugInfo) currCommand += " -g ";
@@ -576,7 +577,7 @@ 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
- ProgramResult readWrite(std::string("bin/wasm-opt ") + input + " -o " + test);
+ ProgramResult readWrite(Path::getBinaryenBinaryTool("wasm-opt") + " " + input + " -o " + test);
if (readWrite.failed()) {
stopIfNotForced("failed to read and write the binary", readWrite);
} else {