From bfccf3592a13a6df6c22000289f3cd56af36ec25 Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Thu, 30 May 2024 21:02:18 -0700 Subject: [PATCH] builder: make sure wasm-opt command line is printed if asked --- builder/build.go | 4 ++++ 1 file changed, 4 insertions(+) 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