mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 16:03:41 +00:00
builder: add support for -x flag
Print commands as they are executed with the -x flag. This is not yet complete: library builds don't print commands yet. But it's a step closer.
This commit is contained in:
committed by
Ron Evans
parent
fb03787b73
commit
896a848001
@@ -476,6 +476,9 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(Buil
|
||||
}
|
||||
ldflags = append(ldflags, dependency.result)
|
||||
}
|
||||
if config.Options.PrintCommands {
|
||||
fmt.Printf("%s %s\n", config.Target.Linker, strings.Join(ldflags, " "))
|
||||
}
|
||||
err = link(config.Target.Linker, ldflags...)
|
||||
if err != nil {
|
||||
return &commandError{"failed to link", executable, err}
|
||||
|
||||
Reference in New Issue
Block a user