aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/tools
diff options
context:
space:
mode:
authorGravatar Alexander Polcyn <apolcyn@google.com>2016-10-12 16:32:46 -0700
committerGravatar Alexander Polcyn <apolcyn@google.com>2016-10-12 16:32:46 -0700
commit0da964435445bcddcb1fecf55283bcf7e347a509 (patch)
tree5212b1eef6f1def38335286937026f2bbb2c19f7 /src/ruby/tools
parent9d45c051e7b7770dd1a799de3ac32eb4fba1f79a (diff)
use target cpu to get rid of cpu enumerations
Diffstat (limited to 'src/ruby/tools')
-rw-r--r--src/ruby/tools/platform_check.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ruby/tools/platform_check.rb b/src/ruby/tools/platform_check.rb
index 19ea2a07fc..2c5ccffdda 100644
--- a/src/ruby/tools/platform_check.rb
+++ b/src/ruby/tools/platform_check.rb
@@ -43,14 +43,11 @@ module PLATFORM
end
end
- # The 'host_cpu' value on x86, 32-bit rubies, appears to turn out to
- # be the name of the cpu. Only need to know the architecture,
- # so enumerating x86 cpu's here.
def PLATFORM.architecture
- case RbConfig::CONFIG['host_cpu']
+ case RbConfig::CONFIG['target_cpu']
when /x86_64/
'x86_64'
- when /x86|i386|i486|i586|i686|i786/
+ when /x86|i386/
'x86'
else
fail 'cpu architecture detection failed'