-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/dist: leave cgo enabled if external linking is required
Certain ios and android configurations do not yet support internal linking. On ios, attempting to build without cgo causes tests to fail on essentially every run (golang#57961). On android, it produces a lot of warning spam from the linker, obscuring real problems. Since external linking makes the result of `go install` depend on the installed C toolchain either way, the reproducibility benefit of disabling cgo seems minimal on these platforms anyway. Fixes golang#57961. For golang#24904. Updates golang#57007. Change-Id: Ied2454804e958dd670467db3d5e9ab50a40bb899 Reviewed-on: https://go-review.googlesource.com/c/go/+/463739 Reviewed-by: Russ Cox <[email protected]> Run-TryBot: Bryan Mills <[email protected]> Auto-Submit: Bryan Mills <[email protected]> Reviewed-by: Cherry Mui <[email protected]> TryBot-Bypass: Bryan Mills <[email protected]>
- Loading branch information
1 parent
1b4b504
commit 2719f41
Showing
3 changed files
with
87 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2023 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package main | ||
|
||
import ( | ||
"internal/platform" | ||
"testing" | ||
) | ||
|
||
// TestMustLinkExternal verifies that the mustLinkExternal helper | ||
// function matches internal/platform.MustLinkExternal. | ||
func TestMustLinkExternal(t *testing.T) { | ||
for _, goos := range okgoos { | ||
for _, goarch := range okgoarch { | ||
got := mustLinkExternal(goos, goarch) | ||
want := platform.MustLinkExternal(goos, goarch) | ||
if got != want { | ||
t.Errorf("mustLinkExternal(%q, %q) = %v; want %v", goos, goarch, got, want) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters