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

mkconfig.rb: take CPU name from arch flag

This commit is contained in:
Nobuyoshi Nakada 2022-11-04 18:19:30 +09:00
parent cb18deee72
commit ed9d761217
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -124,6 +124,14 @@ File.foreach "config.status" do |line|
if universal if universal
platform = val.sub(/universal/, %q[#{arch && universal[/(?:\A|\s)#{Regexp.quote(arch)}=(\S+)/, 1] || RUBY_PLATFORM[/\A[^-]*/]}]) platform = val.sub(/universal/, %q[#{arch && universal[/(?:\A|\s)#{Regexp.quote(arch)}=(\S+)/, 1] || RUBY_PLATFORM[/\A[^-]*/]}])
end end
when /^target_cpu$/
if universal
val = 'arch'
end
when /^target$/
val = '"$(target_cpu)-$(target_vendor)-$(target_os)"'
when /^host(?:_(?:os|vendor|cpu|alias))?$/
val = %["$(#{name.sub(/^host/, 'target')})"]
when /^includedir$/ when /^includedir$/
val = '"$(SDKROOT)"'+val if /darwin/ =~ arch val = '"$(SDKROOT)"'+val if /darwin/ =~ arch
end end