Skip to content

Commit dc54d7b

Browse files
qiulaidongfenggopherbot
authored andcommitted
all: remove support for windows/arm
Also CL 690655 for golang.org/x/sys. For #71671 Change-Id: Iceb369dec5affb944a39d07cdabfd7add6f1f319 Reviewed-on: https://go-review.googlesource.com/c/go/+/648795 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Quim Muntal <[email protected]> Reviewed-by: Mark Freeman <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent e0a1ea4 commit dc54d7b

File tree

19 files changed

+15
-4205
lines changed

19 files changed

+15
-4205
lines changed

doc/next/7-ports.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
## Ports {#ports}
22

3+
### Windows
4+
5+
<!-- go.dev/issue/71671 -->
6+
As [announced](/doc/go1.25#windows) in the Go 1.25 release notes, the [broken](/doc/go1.24#windows) 32-bit windows/arm port (`GOOS=windows` `GOARCH=arm`) is removed.

src/cmd/dist/build.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,6 @@ var cgoEnabled = map[string]bool{
18191819
"solaris/amd64": true,
18201820
"windows/386": true,
18211821
"windows/amd64": true,
1822-
"windows/arm": false,
18231822
"windows/arm64": true,
18241823
}
18251824

@@ -1831,7 +1830,6 @@ var broken = map[string]bool{
18311830
"freebsd/riscv64": true, // Broken: go.dev/issue/73568.
18321831
"linux/sparc64": true, // An incomplete port. See CL 132155.
18331832
"openbsd/mips64": true, // Broken: go.dev/issue/58110.
1834-
"windows/arm": true, // Broken: go.dev/issue/68552.
18351833
}
18361834

18371835
// List of platforms which are first class ports. See go.dev/issue/38874.

src/cmd/dist/sys_windows.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ type systeminfo struct {
3333
const (
3434
PROCESSOR_ARCHITECTURE_AMD64 = 9
3535
PROCESSOR_ARCHITECTURE_INTEL = 0
36-
PROCESSOR_ARCHITECTURE_ARM = 5
3736
PROCESSOR_ARCHITECTURE_ARM64 = 12
3837
PROCESSOR_ARCHITECTURE_IA64 = 6
3938
)
@@ -47,8 +46,6 @@ func sysinit() {
4746
gohostarch = "amd64"
4847
case PROCESSOR_ARCHITECTURE_INTEL:
4948
gohostarch = "386"
50-
case PROCESSOR_ARCHITECTURE_ARM:
51-
gohostarch = "arm"
5249
case PROCESSOR_ARCHITECTURE_ARM64:
5350
gohostarch = "arm64"
5451
default:

src/cmd/internal/objfile/pe.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,6 @@ func (f *peFile) goarch() string {
174174
return "386"
175175
case pe.IMAGE_FILE_MACHINE_AMD64:
176176
return "amd64"
177-
case pe.IMAGE_FILE_MACHINE_ARMNT:
178-
return "arm"
179177
case pe.IMAGE_FILE_MACHINE_ARM64:
180178
return "arm64"
181179
default:

src/cmd/link/internal/arm/obj.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,5 @@ func archinit(ctxt *ld.Link) {
105105
if *ld.FlagTextAddr == -1 {
106106
*ld.FlagTextAddr = ld.Rnd(0x10000, *ld.FlagRound) + int64(ld.HEADR)
107107
}
108-
109-
case objabi.Hwindows: /* PE executable */
110-
// ld.HEADR, ld.FlagTextAddr, ld.FlagRound are set in ld.Peinit
111-
return
112108
}
113109
}

src/cmd/link/internal/ld/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (mode *BuildMode) Set(s string) error {
3434
return fmt.Errorf("invalid buildmode: %q", s)
3535
case "exe":
3636
switch buildcfg.GOOS + "/" + buildcfg.GOARCH {
37-
case "darwin/arm64", "windows/arm", "windows/arm64": // On these platforms, everything is PIE
37+
case "darwin/arm64", "windows/arm64": // On these platforms, everything is PIE
3838
*mode = BuildModePIE
3939
default:
4040
*mode = BuildModeExe

src/cmd/link/internal/ld/pe.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,6 @@ func (f *peFile) writeFileHeader(ctxt *Link) {
913913
fh.Machine = pe.IMAGE_FILE_MACHINE_AMD64
914914
case sys.I386:
915915
fh.Machine = pe.IMAGE_FILE_MACHINE_I386
916-
case sys.ARM:
917-
fh.Machine = pe.IMAGE_FILE_MACHINE_ARMNT
918916
case sys.ARM64:
919917
fh.Machine = pe.IMAGE_FILE_MACHINE_ARM64
920918
}

src/internal/platform/supported.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func BuildModeSupported(compiler, buildmode, goos, goarch string) bool {
194194
"ios/amd64", "ios/arm64",
195195
"aix/ppc64",
196196
"openbsd/arm64",
197-
"windows/386", "windows/amd64", "windows/arm", "windows/arm64":
197+
"windows/386", "windows/amd64", "windows/arm64":
198198
return true
199199
}
200200
return false
@@ -226,7 +226,7 @@ func InternalLinkPIESupported(goos, goarch string) bool {
226226
case "android/arm64",
227227
"darwin/amd64", "darwin/arm64",
228228
"linux/amd64", "linux/arm64", "linux/loong64", "linux/ppc64le",
229-
"windows/386", "windows/amd64", "windows/arm", "windows/arm64":
229+
"windows/386", "windows/amd64", "windows/arm64":
230230
return true
231231
}
232232
return false

src/internal/platform/zosarch.go

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/runtime/asm_arm.s

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -794,9 +794,6 @@ TEXT setg<>(SB),NOSPLIT|NOFRAME,$0-0
794794
MOVW R0, g
795795

796796
// Save g to thread-local storage.
797-
#ifdef GOOS_windows
798-
B runtime·save_g(SB)
799-
#else
800797
#ifdef GOOS_openbsd
801798
B runtime·save_g(SB)
802799
#else
@@ -808,7 +805,6 @@ TEXT setg<>(SB),NOSPLIT|NOFRAME,$0-0
808805
MOVW g, R0
809806
RET
810807
#endif
811-
#endif
812808

813809
TEXT runtime·emptyfunc(SB),0,$0-0
814810
RET

0 commit comments

Comments
 (0)