1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

rbconfig.rb: extract cpu from RUBY_PLATFORM when universal

This commit is contained in:
Nobuyoshi Nakada 2021-01-07 14:55:33 +09:00
parent ee1e690a2d
commit 96ce1d9a0f
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -121,7 +121,7 @@ File.foreach "config.status" do |line|
universal, val = val, 'universal' if universal
when /^arch$/
if universal
val.sub!(/universal/, %q[#{arch && universal[/(?:\A|\s)#{Regexp.quote(arch)}=(\S+)/, 1] || '\&'}])
val.sub!(/universal/, %q[#{arch && universal[/(?:\A|\s)#{Regexp.quote(arch)}=(\S+)/, 1] || RUBY_PLATFORM[/\A[^-]*/]}])
end
when /^oldincludedir$/
val = '"$(SDKROOT)"'+val if /darwin/ =~ arch