1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

don't use other cpu detection methods unless absolutely necessary.

This commit is contained in:
Charles Lowell 2010-06-16 18:17:22 +03:00
parent 991e671d1d
commit dcb90f40c2

View file

@ -12,19 +12,15 @@ def x86_64_from_arch_flag
RbConfig::MAKEFILE_CONFIG['ARCH_FLAG'] =~ /x86_64/ RbConfig::MAKEFILE_CONFIG['ARCH_FLAG'] =~ /x86_64/
end end
def darwin?
RUBY_PLATFORM =~ /darwin/
end
def rubinius? def rubinius?
Object.const_defined?(:RUBY_ENGINE) && RUBY_ENGINE == "rbx" Object.const_defined?(:RUBY_ENGINE) && RUBY_ENGINE == "rbx"
end end
def x64? def x64?
if darwin? && !rubinius? if rubinius?
x86_64_from_arch_flag x86_64_from_build_cpu || x86_64_from_arch_flag
else else
x86_64_from_build_cpu || x86_64_from_byte_length x86_64_from_byte_length
end end
end end