Skip to content

Commit 4169b1e

Browse files
committed
[release-branch.go1.13] cmd/link: ensure cgo cflags do not leak into tvOS test
Running the 'TestBuildForTvOS' test with CGO_CFLAGS set with certain values would cause the test to fail. all.bash would fail when CGO_CFLAGS was set to '-mmacosx-version-min=10.10' because the --macosx-version-min flag is incompatible with tvOS. The change guards against using an unintended flag in the unit test. Updates #36846 Updated #35459 Change-Id: Ifc43f3ebfb23d37aabeaac2ea9efae5b877991bf Reviewed-on: https://go-review.googlesource.com/c/go/+/215957 Run-TryBot: Carlos Amedee <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> (cherry picked from commit ace25f8) Reviewed-on: https://go-review.googlesource.com/c/go/+/218598
1 parent 6f57b10 commit 4169b1e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cmd/link/link_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ func TestBuildForTvOS(t *testing.T) {
214214
"GOOS=darwin",
215215
"GOARCH=arm64",
216216
"CC="+strings.Join(CC, " "),
217+
"CGO_CFLAGS=", // ensure CGO_CFLAGS does not contain any flags. Issue #35459
217218
)
218219
if out, err := cmd.CombinedOutput(); err != nil {
219220
t.Fatalf("%v: %v:\n%s", cmd.Args, err, out)

0 commit comments

Comments
 (0)