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/
|
||||
end
|
||||
|
||||
def darwin?
|
||||
RUBY_PLATFORM =~ /darwin/
|
||||
end
|
||||
|
||||
def rubinius?
|
||||
Object.const_defined?(:RUBY_ENGINE) && RUBY_ENGINE == "rbx"
|
||||
end
|
||||
|
||||
def x64?
|
||||
if darwin? && !rubinius?
|
||||
x86_64_from_arch_flag
|
||||
if rubinius?
|
||||
x86_64_from_build_cpu || x86_64_from_arch_flag
|
||||
else
|
||||
x86_64_from_build_cpu || x86_64_from_byte_length
|
||||
x86_64_from_byte_length
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue