mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/testdir: pass -buildid to link command
The new dynamic loader in macOS 26 beta doesn't like binaries without LC_UUID. Binaries built by "go build" have LC_UUID by default. When invoking the linker manually, it has an LC_UUID by default if a Go buildid is specified. This CL makes it pass -buildid to link command for the test directory, so the binaries will have LC_UUID. Change-Id: I9369aeb7323d211eda80e4f22f459c220085f61d Reviewed-on: https://go-review.googlesource.com/c/go/+/692876 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
f53dcb6280
commit
025d36917c
1 changed files with 1 additions and 1 deletions
|
|
@ -242,7 +242,7 @@ func linkFile(runcmd runCmd, outfile, infile string, importcfg string, ldflags [
|
||||||
if strings.HasSuffix(infile, ".go") {
|
if strings.HasSuffix(infile, ".go") {
|
||||||
infile = infile[:len(infile)-3] + ".o"
|
infile = infile[:len(infile)-3] + ".o"
|
||||||
}
|
}
|
||||||
cmd := []string{goTool, "tool", "link", "-s", "-w", "-o", outfile, "-importcfg=" + importcfg}
|
cmd := []string{goTool, "tool", "link", "-s", "-w", "-buildid=test", "-o", outfile, "-importcfg=" + importcfg}
|
||||||
if *linkshared {
|
if *linkshared {
|
||||||
cmd = append(cmd, "-linkshared", "-installsuffix=dynlink")
|
cmd = append(cmd, "-linkshared", "-installsuffix=dynlink")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue