mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix fake.rb RUBY_DESCRIPTION faking for JITs
Previously, `make test-spec` was not printing the description with +YJIT even when YJIT was indeed enabled. It was confusing on CI. `fake.rb` was changing the `RUBY_DESCRIPTION` constant incorrectly. I suppose `make test-spec` mostly needs the `mkmf` faking and not the faking of `RUBY_.*` constants, so maybe there is an opportunity to simplify in the future.
This commit is contained in:
parent
492349ab5c
commit
5f1f8c244d
Notes:
git
2022-04-12 02:28:31 +09:00
Merged: https://github.com/ruby/ruby/pull/5782 Merged-By: XrXr
1 changed files with 9 additions and 3 deletions
|
@ -18,6 +18,7 @@ if inc = arg['i']
|
|||
version[n] = src.value(v)
|
||||
end
|
||||
arg['RUBY_DESCRIPTION_WITH_MJIT'] = src.value('description_with_mjit')
|
||||
arg['RUBY_DESCRIPTION_WITH_YJIT'] = src.value('description_with_yjit')
|
||||
end
|
||||
%>baseruby="<%=arg['BASERUBY']%>"
|
||||
_\
|
||||
|
@ -34,9 +35,14 @@ class Object
|
|||
CROSS_COMPILING = RUBY_PLATFORM
|
||||
constants.grep(/^RUBY_/) {|n| remove_const n}
|
||||
% arg['versions'].each {|n, v|
|
||||
<%=n%> = <%if n=='RUBY_DESCRIPTION' %>RubyVM.const_defined?(:JIT) && RubyVM::MJIT.enabled? ?
|
||||
<%=arg['RUBY_DESCRIPTION_WITH_JIT'].inspect%> :
|
||||
<%end%><%=v.inspect%>
|
||||
<%=n%> = <%if n=='RUBY_DESCRIPTION' %>case
|
||||
when RubyVM.const_defined?(:MJIT) && RubyVM::MJIT.enabled?
|
||||
<%=arg['RUBY_DESCRIPTION_WITH_MJIT'].inspect%>
|
||||
when RubyVM.const_defined?(:YJIT) && RubyVM::YJIT.enabled?
|
||||
<%=arg['RUBY_DESCRIPTION_WITH_YJIT'].inspect%>
|
||||
else
|
||||
<%=v.inspect%>
|
||||
end<%else%><%=v.inspect%><%end%>
|
||||
% }
|
||||
end
|
||||
builddir = File.dirname(File.expand_path(__FILE__))
|
||||
|
|
Loading…
Reference in a new issue