]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link/internal/ld: Skip combining dwarf for darwin/arm.
authorRyan Brown <ribrdb@google.com>
Wed, 8 Apr 2015 19:55:34 +0000 (12:55 -0700)
committerDavid Crawshaw <crawshaw@golang.org>
Thu, 28 May 2015 12:04:35 +0000 (12:04 +0000)
Change-Id: I3a6df0a76d57db7cb6910f4179a6ce380f219a37
Reviewed-on: https://go-review.googlesource.com/10442
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/link/internal/ld/lib.go

index 32ee45bcec2734bc63827d005c927fe8a8a5c5a5..d87f1801f0b2e4c4ce6a412ae248b1fd30ede9e2 100644 (file)
@@ -1055,21 +1055,24 @@ func hostlink() {
        }
 
        if Debug['s'] == 0 && debug_s == 0 && HEADTYPE == obj.Hdarwin {
-               dsym := fmt.Sprintf("%s/go.dwarf", tmpdir)
-               if out, err := exec.Command("dsymutil", "-f", outfile, "-o", dsym).CombinedOutput(); err != nil {
-                       Ctxt.Cursym = nil
-                       Exitf("%s: running dsymutil failed: %v\n%s", os.Args[0], err, out)
-               }
-               combinedOutput := fmt.Sprintf("%s/go.combined", tmpdir)
-               if err := machoCombineDwarf(outfile, dsym, combinedOutput); err != nil {
-                       Ctxt.Cursym = nil
-                       Exitf("%s: combining dwarf failed: %v", os.Args[0], err)
-               }
-               origOutput := fmt.Sprintf("%s/go.orig", tmpdir)
-               os.Rename(outfile, origOutput)
-               if err := os.Rename(combinedOutput, outfile); err != nil {
-                       Ctxt.Cursym = nil
-                       Exitf("%s: rename(%s, %s) failed: %v", os.Args[0], combinedOutput, outfile, err)
+               // Skip combining dwarf on arm.
+               if Thearch.Thechar != '5' && Thearch.Thechar != '7' {
+                       dsym := fmt.Sprintf("%s/go.dwarf", tmpdir)
+                       if out, err := exec.Command("dsymutil", "-f", outfile, "-o", dsym).CombinedOutput(); err != nil {
+                               Ctxt.Cursym = nil
+                               Exitf("%s: running dsymutil failed: %v\n%s", os.Args[0], err, out)
+                       }
+                       combinedOutput := fmt.Sprintf("%s/go.combined", tmpdir)
+                       if err := machoCombineDwarf(outfile, dsym, combinedOutput); err != nil {
+                               Ctxt.Cursym = nil
+                               Exitf("%s: combining dwarf failed: %v", os.Args[0], err)
+                       }
+                       origOutput := fmt.Sprintf("%s/go.orig", tmpdir)
+                       os.Rename(outfile, origOutput)
+                       if err := os.Rename(combinedOutput, outfile); err != nil {
+                               Ctxt.Cursym = nil
+                               Exitf("%s: rename(%s, %s) failed: %v", os.Args[0], combinedOutput, outfile, err)
+                       }
                }
        }
 }