@@ -1333,25 +1333,22 @@ func (ctxt *Link) hostlink() {
1333
1333
}
1334
1334
1335
1335
if ! * FlagS && ! * FlagW && ! debug_s && ctxt .HeadType == objabi .Hdarwin {
1336
- // Skip combining dwarf on arm.
1337
- if ! ctxt .Arch .InFamily (sys .ARM , sys .ARM64 ) {
1338
- dsym := filepath .Join (* flagTmpdir , "go.dwarf" )
1339
- if out , err := exec .Command ("dsymutil" , "-f" , * flagOutfile , "-o" , dsym ).CombinedOutput (); err != nil {
1340
- Exitf ("%s: running dsymutil failed: %v\n %s" , os .Args [0 ], err , out )
1341
- }
1342
- // Skip combining if `dsymutil` didn't generate a file. See #11994.
1343
- if _ , err := os .Stat (dsym ); os .IsNotExist (err ) {
1344
- return
1345
- }
1346
- // For os.Rename to work reliably, must be in same directory as outfile.
1347
- combinedOutput := * flagOutfile + "~"
1348
- if err := machoCombineDwarf (* flagOutfile , dsym , combinedOutput , ctxt .BuildMode ); err != nil {
1349
- Exitf ("%s: combining dwarf failed: %v" , os .Args [0 ], err )
1350
- }
1351
- os .Remove (* flagOutfile )
1352
- if err := os .Rename (combinedOutput , * flagOutfile ); err != nil {
1353
- Exitf ("%s: %v" , os .Args [0 ], err )
1354
- }
1336
+ dsym := filepath .Join (* flagTmpdir , "go.dwarf" )
1337
+ if out , err := exec .Command ("dsymutil" , "-f" , * flagOutfile , "-o" , dsym ).CombinedOutput (); err != nil {
1338
+ Exitf ("%s: running dsymutil failed: %v\n %s" , os .Args [0 ], err , out )
1339
+ }
1340
+ // Skip combining if `dsymutil` didn't generate a file. See #11994.
1341
+ if _ , err := os .Stat (dsym ); os .IsNotExist (err ) {
1342
+ return
1343
+ }
1344
+ // For os.Rename to work reliably, must be in same directory as outfile.
1345
+ combinedOutput := * flagOutfile + "~"
1346
+ if err := machoCombineDwarf (* flagOutfile , dsym , combinedOutput , ctxt .BuildMode ); err != nil {
1347
+ Exitf ("%s: combining dwarf failed: %v" , os .Args [0 ], err )
1348
+ }
1349
+ os .Remove (* flagOutfile )
1350
+ if err := os .Rename (combinedOutput , * flagOutfile ); err != nil {
1351
+ Exitf ("%s: %v" , os .Args [0 ], err )
1355
1352
}
1356
1353
}
1357
1354
}
0 commit comments