darwin/arm64 binary says it is running under Rosetta 2 on macOS M1 machine #44733
Labels
arch-arm64
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Darwin
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, Go 1.16 is the latest release.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Consider the following program, saved on
main.go
:As per Apple's documentation, if I am translating the code correctly to Go, this should detect whether a binary is running natively or it is being translated under Rosetta.
Build the program both for
amd64
andarm64
on macOS:What did you expect to see?
The
amd64
binary should report it is running natively on a macOS withamd64
architecture and it should report it is running under Rosetta 2 on a macOS witharm64
architecture.The
arm64
binary should not be runnable on a macOS withamd64
architecture and it should report it is running natively on a macOS witharm64
architecture.What did you see instead?
When running on a macOS with an
amd64
architecture I see the followingWhen running on a macOS with an
arm64
architecture (with a macOS M1 chip) I see the followingI would expect this last line to say
Running natively
since it is anarm64
executable on anarm64
macOS.The text was updated successfully, but these errors were encountered: