Skip to content

Commit 025d369

Browse files
committed
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 <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent f53dcb6 commit 025d369

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/internal/testdir/testdir_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func linkFile(runcmd runCmd, outfile, infile string, importcfg string, ldflags [
242242
if strings.HasSuffix(infile, ".go") {
243243
infile = infile[:len(infile)-3] + ".o"
244244
}
245-
cmd := []string{goTool, "tool", "link", "-s", "-w", "-o", outfile, "-importcfg=" + importcfg}
245+
cmd := []string{goTool, "tool", "link", "-s", "-w", "-buildid=test", "-o", outfile, "-importcfg=" + importcfg}
246246
if *linkshared {
247247
cmd = append(cmd, "-linkshared", "-installsuffix=dynlink")
248248
}

0 commit comments

Comments
 (0)