aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2024-05-30 21:02:18 -0700
committerDamian Gryski <[email protected]>2024-05-31 11:20:04 -0700
commitbfccf3592a13a6df6c22000289f3cd56af36ec25 (patch)
tree4cb07fa8d35ffd492f88f2382d10309d7d9dc00d
parent272fea13e71b677c4fa40a0315c89cf97cbd84d7 (diff)
downloadtinygo-bfccf3592a13a6df6c22000289f3cd56af36ec25.tar.gz
tinygo-bfccf3592a13a6df6c22000289f3cd56af36ec25.zip
builder: make sure wasm-opt command line is printed if asked
-rw-r--r--builder/build.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/builder/build.go b/builder/build.go
index e415781fe..c569bb1d2 100644
--- a/builder/build.go
+++ b/builder/build.go
@@ -840,6 +840,10 @@ func Build(pkgName, outpath, tmpdir string, config *compileopts.Config) (BuildRe
"--output", result.Executable,
)
+ if config.Options.PrintCommands != nil {
+ config.Options.PrintCommands(goenv.Get("WASMOPT"), args...)
+ }
+
cmd := exec.Command(goenv.Get("WASMOPT"), args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr