Merge pull request #9252 from felixbuenemann/arm64-cpu-detection-tweaks

Better check for Rosetta 2
This commit is contained in:
Mike McQuaid 2020-11-23 08:30:20 +00:00 committed by GitHub
commit 8992ad9dbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ module Hardware
# conflict between what `uname` reports and the underlying `sysctl` flags,
# since the `sysctl` flags don't change behaviour under Rosetta 2.
def in_rosetta2?
intel? && physical_cpu_arm64?
sysctl_bool("sysctl.proc_translated")
end
def features