diff options
| author | Cherry Mui <cherryyz@google.com> | 2023-06-16 16:03:29 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2023-07-21 15:44:44 +0000 |
| commit | 5bf8f533f0d13091c93decadea3552b03c13c751 (patch) | |
| tree | a30053f5b15a13558b44b4a5318e4be24b92853b /src | |
| parent | 4d21b3ec2d63163962feb0cfaceaa33c6b98e6a5 (diff) | |
| download | go-5bf8f533f0d13091c93decadea3552b03c13c751.tar.xz | |
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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/link/internal/ld/lib.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index 595e656e5b..de0a54d588 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -1930,6 +1930,13 @@ func (ctxt *Link) hostlink() { // dsymutil may not clean up its temp directory at exit. // Set DSYMUTIL_REPRODUCER_PATH to work around. see issue 59026. 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 { 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, *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 { Exitf("%s: running strip failed: %v\n%s", os.Args[0], err, out) } |
