mirror of
https://github.com/golang/go
synced 2024-11-11 19:51:37 -07:00
cmd/dist: add windows/arm64 support
- Add Windows SystemInfo constant for arm64 - Add windows/arm64 to GOOS/GOARCH list This CL is part of a stack adding windows/arm64 support (#36439), intended to land in the Go 1.17 cycle. Change-Id: I6109bd87512b5cb1d227d7a85fd0ac20eb2259e5 Reviewed-on: https://go-review.googlesource.com/c/go/+/288819 Trust: Russ Cox <rsc@golang.org> Trust: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
bb6efb9609
commit
0c633125f2
1
src/cmd/dist/build.go
vendored
1
src/cmd/dist/build.go
vendored
@ -1575,6 +1575,7 @@ var cgoEnabled = map[string]bool{
|
||||
"windows/386": true,
|
||||
"windows/amd64": true,
|
||||
"windows/arm": false,
|
||||
"windows/arm64": false,
|
||||
}
|
||||
|
||||
// List of platforms which are supported but not complete yet. These get
|
||||
|
5
src/cmd/dist/sys_windows.go
vendored
5
src/cmd/dist/sys_windows.go
vendored
@ -29,10 +29,13 @@ type systeminfo struct {
|
||||
wProcessorRevision uint16
|
||||
}
|
||||
|
||||
// See https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
|
||||
const (
|
||||
PROCESSOR_ARCHITECTURE_AMD64 = 9
|
||||
PROCESSOR_ARCHITECTURE_INTEL = 0
|
||||
PROCESSOR_ARCHITECTURE_ARM = 5
|
||||
PROCESSOR_ARCHITECTURE_ARM64 = 12
|
||||
PROCESSOR_ARCHITECTURE_IA64 = 6
|
||||
)
|
||||
|
||||
var sysinfo systeminfo
|
||||
@ -46,6 +49,8 @@ func sysinit() {
|
||||
gohostarch = "386"
|
||||
case PROCESSOR_ARCHITECTURE_ARM:
|
||||
gohostarch = "arm"
|
||||
case PROCESSOR_ARCHITECTURE_ARM64:
|
||||
gohostarch = "arm64"
|
||||
default:
|
||||
fatalf("unknown processor architecture")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user