Commit bb20266c authored by Tamir Duberstein's avatar Tamir Duberstein Committed by Ian Lance Taylor

cmd/internal/ld: skip dwarf output if dsymutil no-ops

Fixes #11994.

Change-Id: Icee6ffa6e3a9d15b68b4ae9b2716d65ecbdba73a
Reviewed-on: https://go-review.googlesource.com/16702Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 53d42fbe
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment