]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist, internal/platform: enable internal linking feature and test on loong64
authorlimeidan <limeidan@loongson.cn>
Mon, 9 Oct 2023 09:32:03 +0000 (17:32 +0800)
committerabner chenc <chenguoqi@loongson.cn>
Wed, 21 May 2025 03:28:18 +0000 (20:28 -0700)
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>
src/cmd/dist/build.go
src/cmd/dist/test.go
src/internal/platform/supported.go

index b50f3342fe8714b5f395a06fb5529db38017a045..23deece6fbf7ade510c04d7808de583d39c4d191 100644 (file)
@@ -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
index ae1f5db5348eee0fb94527e737b376c0a3c29521..82c6ee4631ee87e55083bde841c291fc65df218b 100644 (file)
@@ -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
index 2e09a2d6d8be5355df1383929dadc2b98e11934e..7d25fd7ee990eca2e8fa086f30df8147c299a77c 100644 (file)
@@ -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
        }