mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: print dsymutil and strip commands in -v mode
If -v is specified, print dsymutil and strip commands. Change-Id: Icaff2b41ab582d8c58a4ec65438c2986d88def9f Reviewed-on: https://go-review.googlesource.com/c/go/+/506758 Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
4d21b3ec2d
commit
5bf8f533f0
1 changed files with 14 additions and 0 deletions
|
|
@ -1930,6 +1930,13 @@ func (ctxt *Link) hostlink() {
|
||||||
// dsymutil may not clean up its temp directory at exit.
|
// dsymutil may not clean up its temp directory at exit.
|
||||||
// Set DSYMUTIL_REPRODUCER_PATH to work around. see issue 59026.
|
// Set DSYMUTIL_REPRODUCER_PATH to work around. see issue 59026.
|
||||||
cmd.Env = append(os.Environ(), "DSYMUTIL_REPRODUCER_PATH="+*flagTmpdir)
|
cmd.Env = append(os.Environ(), "DSYMUTIL_REPRODUCER_PATH="+*flagTmpdir)
|
||||||
|
if ctxt.Debugvlog != 0 {
|
||||||
|
ctxt.Logf("host link dsymutil:")
|
||||||
|
for _, v := range cmd.Args {
|
||||||
|
ctxt.Logf(" %q", v)
|
||||||
|
}
|
||||||
|
ctxt.Logf("\n")
|
||||||
|
}
|
||||||
if out, err := cmd.CombinedOutput(); err != nil {
|
if out, err := cmd.CombinedOutput(); err != nil {
|
||||||
Exitf("%s: running dsymutil failed: %v\n%s", os.Args[0], err, out)
|
Exitf("%s: running dsymutil failed: %v\n%s", os.Args[0], err, out)
|
||||||
}
|
}
|
||||||
|
|
@ -1943,6 +1950,13 @@ func (ctxt *Link) hostlink() {
|
||||||
stripArgs = append(stripArgs, "-x")
|
stripArgs = append(stripArgs, "-x")
|
||||||
}
|
}
|
||||||
stripArgs = append(stripArgs, *flagOutfile)
|
stripArgs = append(stripArgs, *flagOutfile)
|
||||||
|
if ctxt.Debugvlog != 0 {
|
||||||
|
ctxt.Logf("host link strip: %q", stripCmd)
|
||||||
|
for _, v := range stripArgs {
|
||||||
|
ctxt.Logf(" %q", v)
|
||||||
|
}
|
||||||
|
ctxt.Logf("\n")
|
||||||
|
}
|
||||||
if out, err := exec.Command(stripCmd, stripArgs...).CombinedOutput(); err != nil {
|
if out, err := exec.Command(stripCmd, stripArgs...).CombinedOutput(); err != nil {
|
||||||
Exitf("%s: running strip failed: %v\n%s", os.Args[0], err, out)
|
Exitf("%s: running strip failed: %v\n%s", os.Args[0], err, out)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue