Hi,
i'm looking for a way to detect, from an x86_64 executable (ostensibly running in Rosetta), whether the architecture of the current system is arm64.
Unfortunately, it seems even calling out to "/usr/bin/uname -m" via TSTask does not work, as uname seems to return "x86_64" the called from a x86_64 process, even on Apple Silicon (it returns arm64 as expected, when the calling process is arm64 too).
Is this as designed, or a bug? And does anyone have an alternative suggestion to safely detect the system architecture?
i'm looking for a way to detect, from an x86_64 executable (ostensibly running in Rosetta), whether the architecture of the current system is arm64.
Unfortunately, it seems even calling out to "/usr/bin/uname -m" via TSTask does not work, as uname seems to return "x86_64" the called from a x86_64 process, even on Apple Silicon (it returns arm64 as expected, when the calling process is arm64 too).
Is this as designed, or a bug? And does anyone have an alternative suggestion to safely detect the system architecture?