1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Deal with MJIT_FORCE_ENABLE miniruby

http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/4225469
This commit is contained in:
Takashi Kokubun 2022-09-05 08:37:07 -07:00
parent ca172540d0
commit 63ed61e322
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

9
mjit.c
View file

@ -1806,6 +1806,15 @@ mjit_init(const struct mjit_options *opts)
{
VM_ASSERT(mjit_enabled);
mjit_opts = *opts;
// MJIT doesn't support miniruby, but it might reach here by MJIT_FORCE_ENABLE.
VALUE rb_mMJIT = rb_const_get(rb_cRubyVM, rb_intern("MJIT"));
if (!rb_const_defined(rb_mMJIT, rb_intern("Compiler"))) {
verbose(1, "Disabling MJIT because RubyVM::MJIT::Compiler is not defined");
mjit_enabled = false;
return;
}
mjit_call_p = true;
mjit_pid = getpid();