Skip to content

compiler: detect ARM64 features on windows#2473

Merged
ncruces merged 2 commits intomainfrom
arm
Feb 16, 2026
Merged

compiler: detect ARM64 features on windows#2473
ncruces merged 2 commits intomainfrom
arm

Conversation

@ncruces
Copy link
Contributor

@ncruces ncruces commented Feb 9, 2026

Fixes #2472.

Fixes #2472.

Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
@ncruces ncruces requested a review from a team as a code owner February 9, 2026 10:31
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
@ncruces
Copy link
Contributor Author

ncruces commented Feb 9, 2026

Reminder to self: raise a PR against x/sys/cpu to set more appropriate defaults on "darwin".

@ncruces ncruces changed the title cpu: detect ARM64 features on windows compiler: detect ARM64 features on windows Feb 9, 2026
gopherbot pushed a commit to golang/sys that referenced this pull request Feb 12, 2026
This is motivated by
wazero/wazero#2473
which needs to special case darwin for testing the availability of
HasATOMICS, although all M-series CPUs support it.

We could do sysctlbyname, like syscall_darwin_x86_gc.go, if that's
preferred:
https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics

Change-Id: I0f5ea55ef5cda4956db44b2d40f2f10044fa3321
GitHub-Last-Rev: d5d0f1e
GitHub-Pull-Request: #267
Reviewed-on: https://go-review.googlesource.com/c/sys/+/743320
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
@ncruces
Copy link
Contributor Author

ncruces commented Feb 12, 2026

We can also wait for golang/sys#267 to be released.

@ncruces ncruces merged commit 44270c8 into main Feb 16, 2026
43 checks passed
@ncruces ncruces deleted the arm branch February 16, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cpu: detect ARM64 features on windows

2 participants