fake.rb: fix RUBY_DESCRIPTION for MJIT

* template/fake.rb.in: switch RUBY_DESCRIPTION at runtime
  depending on the MJIT status.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-05-29 23:28:50 +00:00
Родитель 0342fcbd51
Коммит 9fd0858c3b
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -15,7 +15,7 @@ if inc = arg['i']
scan(/rb_define_global_const\("(RUBY_\w+)",[^;]*?\bMK(?:INT|STR)\(([^()]*)\)/m) do |n, v|
version[n] = src.value(v)
end
version['RUBY_DESCRIPTION'] = src.value('description_with_jit') if RubyVM::MJIT.enabled?
arg['RUBY_DESCRIPTION_WITH_JIT'] = src.value('description_with_jit')
end
%>baseruby="<%=arg['BASERUBY']%>"
_\
@ -32,7 +32,9 @@ class Object
CROSS_COMPILING = RUBY_PLATFORM
constants.grep(/^RUBY_/) {|n| remove_const n}
% arg['versions'].each {|n, v|
<%=n%> = <%=v.inspect%>
<%=n%> = <%if n=='RUBY_DESCRIPTION' %>RubyVM::MJIT.enabled? ?
<%=arg['RUBY_DESCRIPTION_WITH_JIT'].inspect%> :
<%end%><%=v.inspect%>
% }
end
builddir = File.dirname(File.expand_path(__FILE__))