ruby: use x86_64 binary on M1 macs (#25756)

pull/25918/head
Bouke van der Bijl 4 years ago committed by GitHub
parent 1784e6c962
commit 1fdc534e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/ruby/tools/platform_check.rb

@ -29,7 +29,12 @@ module PLATFORM
end
def PLATFORM.architecture
case RbConfig::CONFIG['host_cpu']
host_cpu = RbConfig::CONFIG['host_cpu']
# When we're on arm in macOS, we can rely on Rosetta and use the x86_64 binary
return 'x86_64' if RbConfig::CONFIG['host_os'] =~ /darwin/ && host_cpu =~ /arm/
case host_cpu
when /x86_64/
'x86_64'
else

Loading…
Cancel
Save