diff options
author | Takashi Kokubun <[email protected]> | 2022-10-24 09:20:44 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-24 12:20:44 -0400 |
commit | 120b747b7df25722c982ff4ba0f8be9a1463bd78 (patch) | |
tree | 15798f8657eabb2a9a8faa5c8dcbcb94cba00c9a /version.c | |
parent | 841be6392ef85a02ab8ce7f323b990d6bbcc09cb (diff) |
YJIT: Lazily enable YJIT after prelude (#6597)
* YJIT: Lazily enable YJIT after prelude
* Update dependencies
* Use a bit field for opt->yjit
Notes
Notes:
Merged-By: maximecb <[email protected]>
Diffstat (limited to 'version.c')
-rw-r--r-- | version.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -9,6 +9,7 @@ **********************************************************************/ +#include "internal/cmdlineopt.h" #include "ruby/ruby.h" #include "version.h" #include "vm_core.h" @@ -121,13 +122,19 @@ Init_version(void) } #if USE_MJIT -#define MJIT_OPTS_ON mjit_opts.on +#define MJIT_OPTS_ON opt->mjit.on #else #define MJIT_OPTS_ON 0 #endif +#if USE_YJIT +#define YJIT_OPTS_ON opt->yjit +#else +#define YJIT_OPTS_ON 0 +#endif + void -Init_ruby_description(void) +Init_ruby_description(ruby_cmdline_options_t *opt) { VALUE description; @@ -135,7 +142,7 @@ Init_ruby_description(void) rb_dynamic_description = ruby_description_with_mjit; description = MKSTR(description_with_mjit); } - else if (rb_yjit_enabled_p()) { + else if (YJIT_OPTS_ON) { rb_dynamic_description = ruby_description_with_yjit; description = MKSTR(description_with_yjit); } |