mirror of
https://github.com/golang/go.git
synced 2025-10-19 11:03:18 +00:00
cmd/dist, internal/platform: enable internal linking feature and test on loong64
Change-Id: Ifea676e9eb44281465832fc4050f6286e50f4543 Reviewed-on: https://go-review.googlesource.com/c/go/+/533717 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn> Reviewed-by: Qiqi Huang <huangqiqi@loongson.cn>
This commit is contained in:
parent
d37a1bdd48
commit
a2eb643cbf
3 changed files with 5 additions and 5 deletions
2
src/cmd/dist/build.go
vendored
2
src/cmd/dist/build.go
vendored
|
@ -620,7 +620,7 @@ func setup() {
|
|||
func mustLinkExternal(goos, goarch string, cgoEnabled bool) bool {
|
||||
if cgoEnabled {
|
||||
switch goarch {
|
||||
case "loong64", "mips", "mipsle", "mips64", "mips64le":
|
||||
case "mips", "mipsle", "mips64", "mips64le":
|
||||
// Internally linking cgo is incomplete on some architectures.
|
||||
// https://golang.org/issue/14449
|
||||
return true
|
||||
|
|
4
src/cmd/dist/test.go
vendored
4
src/cmd/dist/test.go
vendored
|
@ -1169,7 +1169,7 @@ func (t *tester) internalLink() bool {
|
|||
// Internally linking cgo is incomplete on some architectures.
|
||||
// https://golang.org/issue/10373
|
||||
// https://golang.org/issue/14449
|
||||
if goarch == "loong64" || goarch == "mips64" || goarch == "mips64le" || goarch == "mips" || goarch == "mipsle" || goarch == "riscv64" {
|
||||
if goarch == "mips64" || goarch == "mips64le" || goarch == "mips" || goarch == "mipsle" || goarch == "riscv64" {
|
||||
return false
|
||||
}
|
||||
if goos == "aix" {
|
||||
|
@ -1190,7 +1190,7 @@ func (t *tester) internalLinkPIE() bool {
|
|||
}
|
||||
switch goos + "-" + goarch {
|
||||
case "darwin-amd64", "darwin-arm64",
|
||||
"linux-amd64", "linux-arm64", "linux-ppc64le",
|
||||
"linux-amd64", "linux-arm64", "linux-loong64", "linux-ppc64le",
|
||||
"android-arm64",
|
||||
"windows-amd64", "windows-386", "windows-arm":
|
||||
return true
|
||||
|
|
|
@ -85,7 +85,7 @@ func FuzzInstrumented(goos, goarch string) bool {
|
|||
func MustLinkExternal(goos, goarch string, withCgo bool) bool {
|
||||
if withCgo {
|
||||
switch goarch {
|
||||
case "loong64", "mips", "mipsle", "mips64", "mips64le":
|
||||
case "mips", "mipsle", "mips64", "mips64le":
|
||||
// Internally linking cgo is incomplete on some architectures.
|
||||
// https://go.dev/issue/14449
|
||||
return true
|
||||
|
@ -225,7 +225,7 @@ func InternalLinkPIESupported(goos, goarch string) bool {
|
|||
switch goos + "/" + goarch {
|
||||
case "android/arm64",
|
||||
"darwin/amd64", "darwin/arm64",
|
||||
"linux/amd64", "linux/arm64", "linux/ppc64le",
|
||||
"linux/amd64", "linux/arm64", "linux/loong64", "linux/ppc64le",
|
||||
"windows/386", "windows/amd64", "windows/arm", "windows/arm64":
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue