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
1 changed files with 8 additions and 0 deletions

View File

@ -124,6 +124,14 @@ File.foreach "config.status" do |line|
if universal
platform = val.sub(/universal/, %q[#{arch && universal[/(?:\A|\s)#{Regexp.quote(arch)}=(\S+)/, 1] || RUBY_PLATFORM[/\A[^-]*/]}])
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$/
val = '"$(SDKROOT)"'+val if /darwin/ =~ arch
end