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:
parent
991e671d1d
commit
dcb90f40c2
1 changed files with 3 additions and 7 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue