mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/ld: skip dwarf output if dsymutil no-ops
Fixes #11994. Change-Id: Icee6ffa6e3a9d15b68b4ae9b2716d65ecbdba73a Reviewed-on: https://go-review.googlesource.com/16702 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
53d42fbead
commit
bb20266c9d
1 changed files with 4 additions and 0 deletions
|
|
@ -1171,6 +1171,10 @@ func hostlink() {
|
|||
Ctxt.Cursym = nil
|
||||
Exitf("%s: running dsymutil failed: %v\n%s", os.Args[0], err, out)
|
||||
}
|
||||
// Skip combining if `dsymutil` didn't generate a file. See #11994.
|
||||
if _, err := os.Stat(dsym); os.IsNotExist(err) {
|
||||
return
|
||||
}
|
||||
// For os.Rename to work reliably, must be in same directory as outfile.
|
||||
combinedOutput := outfile + "~"
|
||||
if err := machoCombineDwarf(outfile, dsym, combinedOutput); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue