mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
See the environment variable and then check if JIT options conflict
This commit is contained in:
parent
7bab788309
commit
58e7205c82
1 changed files with 5 additions and 5 deletions
10
ruby.c
10
ruby.c
|
@ -1811,11 +1811,6 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
|
|||
*/
|
||||
rb_warning("-K is specified; it is for 1.8 compatibility and may cause odd behavior");
|
||||
|
||||
if (MULTI_BITS_P(FEATURE_SET_BITS(opt->features) & feature_jit_mask)) {
|
||||
rb_warn("MJIT and YJIT cannot both be enabled at the same time. Exiting");
|
||||
return Qfalse;
|
||||
}
|
||||
|
||||
if (!(FEATURE_SET_BITS(opt->features) & feature_jit_mask)) {
|
||||
#if YJIT_BUILD
|
||||
if (!FEATURE_USED_P(opt->features, yjit) && getenv("RUBY_YJIT_ENABLE")) {
|
||||
|
@ -1823,6 +1818,11 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
if (MULTI_BITS_P(FEATURE_SET_BITS(opt->features) & feature_jit_mask)) {
|
||||
rb_warn("MJIT and YJIT cannot both be enabled at the same time. Exiting");
|
||||
return Qfalse;
|
||||
}
|
||||
|
||||
#if USE_MJIT
|
||||
if (FEATURE_SET_P(opt->features, mjit)) {
|
||||
opt->mjit.on = TRUE; /* set mjit.on for ruby_show_version() API and check to call mjit_init() */
|
||||
|
|
Loading…
Reference in a new issue