diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-11-04 18:19:30 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-11-04 18:19:30 +0900 |
commit | ed9d7612172e12f515cb79088efe45267a062276 (patch) | |
tree | 90e6cf01f890ba05a9e5d6e6f2eee81790a2f2cc /tool | |
parent | cb18deee7285dde67102c9702796d7eba0046af5 (diff) |
mkconfig.rb: take CPU name from arch flag
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/mkconfig.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 120b90850d..fb35522401 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -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 |