mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: don't pass -gdwarf-2 to external linker
Don't pass -gdwarf-2 to the external linker when external linkage is requested. The Go compiler is now emitting DWARF version 4, so this doesn't seem needed any more. Fixes #22455 Change-Id: Ic4122c55e946619a266430f2d26f06d6803dd232 Reviewed-on: https://go-review.googlesource.com/73672 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
509140a549
commit
3e1e66fa05
1 changed files with 8 additions and 8 deletions
|
|
@ -1073,15 +1073,15 @@ func (ctxt *Link) hostlink() {
|
||||||
argv = append(argv, *flagExtld)
|
argv = append(argv, *flagExtld)
|
||||||
argv = append(argv, hostlinkArchArgs(ctxt.Arch)...)
|
argv = append(argv, hostlinkArchArgs(ctxt.Arch)...)
|
||||||
|
|
||||||
if !*FlagS && !debug_s {
|
if *FlagS || debug_s {
|
||||||
argv = append(argv, "-gdwarf-2")
|
if ctxt.HeadType == objabi.Hdarwin {
|
||||||
} else if ctxt.HeadType == objabi.Hdarwin {
|
|
||||||
// Recent versions of macOS print
|
// Recent versions of macOS print
|
||||||
// ld: warning: option -s is obsolete and being ignored
|
// ld: warning: option -s is obsolete and being ignored
|
||||||
// so do not pass any arguments.
|
// so do not pass any arguments.
|
||||||
} else {
|
} else {
|
||||||
argv = append(argv, "-s")
|
argv = append(argv, "-s")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch ctxt.HeadType {
|
switch ctxt.HeadType {
|
||||||
case objabi.Hdarwin:
|
case objabi.Hdarwin:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue