Skip to content

Commit

Permalink
Revert an accidentally sync.
Browse files Browse the repository at this point in the history
  Revert "[ruby/open3] Removed to load jit_support.rb"

  This reverts commit 67feb78.
  • Loading branch information
hsbt committed Mar 27, 2023
1 parent 67feb78 commit cc8a48a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/lib/jit_support.rb
@@ -0,0 +1,25 @@
require 'rbconfig'

module JITSupport
module_function

def yjit_supported?
return @yjit_supported if defined?(@yjit_supported)
# nil in mswin
@yjit_supported = ![nil, 'no'].include?(RbConfig::CONFIG['YJIT_SUPPORT'])
end

def yjit_force_enabled?
"#{RbConfig::CONFIG['CFLAGS']} #{RbConfig::CONFIG['CPPFLAGS']}".match?(/(\A|\s)-D ?YJIT_FORCE_ENABLE\b/)
end

def rjit_supported?
return @rjit_supported if defined?(@rjit_supported)
# nil in mswin
@rjit_supported = ![nil, 'no'].include?(RbConfig::CONFIG['RJIT_SUPPORT'])
end

def rjit_force_enabled?
"#{RbConfig::CONFIG['CFLAGS']} #{RbConfig::CONFIG['CPPFLAGS']}".match?(/(\A|\s)-D ?RJIT_FORCE_ENABLE\b/)
end
end

0 comments on commit cc8a48a

Please sign in to comment.