@@ -1196,14 +1196,12 @@ setup_yjit_options(const char *s)
1196
1196
1197
1197
#if USE_ZJIT
1198
1198
static void
1199
- setup_zjit_options (ruby_cmdline_options_t * opt , const char * s )
1199
+ setup_zjit_options (const char * s )
1200
1200
{
1201
1201
// The option parsing is done in zjit/src/options.rs
1202
- extern void * rb_zjit_init_options (void );
1203
- extern bool rb_zjit_parse_option (void * options , const char * s );
1202
+ extern bool rb_zjit_parse_option (const char * s );
1204
1203
1205
- if (!opt -> zjit ) opt -> zjit = rb_zjit_init_options ();
1206
- if (!rb_zjit_parse_option (opt -> zjit , s )) {
1204
+ if (!rb_zjit_parse_option (s )) {
1207
1205
rb_raise (rb_eRuntimeError , "invalid ZJIT option '%s' (--help will show valid zjit options)" , s );
1208
1206
}
1209
1207
}
@@ -1481,7 +1479,7 @@ proc_long_options(ruby_cmdline_options_t *opt, const char *s, long argc, char **
1481
1479
else if (is_option_with_optarg ("zjit ", '- ', true, false, false)) {
1482
1480
#if USE_ZJIT
1483
1481
FEATURE_SET (opt -> features , FEATURE_BIT (zjit ));
1484
- setup_zjit_options (opt , s );
1482
+ setup_zjit_options (s );
1485
1483
#else
1486
1484
rb_warn ("Ruby was built without ZJIT support."
1487
1485
" You may need to install rustc to build Ruby with ZJIT." );
@@ -1828,8 +1826,8 @@ ruby_opt_init(ruby_cmdline_options_t *opt)
1828
1826
#endif
1829
1827
#if USE_ZJIT
1830
1828
if (opt -> zjit ) {
1831
- extern void rb_zjit_init (void * options );
1832
- rb_zjit_init (opt -> zjit );
1829
+ extern void rb_zjit_init (void );
1830
+ rb_zjit_init ();
1833
1831
}
1834
1832
#endif
1835
1833
@@ -2370,8 +2368,9 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
2370
2368
#endif
2371
2369
#if USE_ZJIT
2372
2370
if (FEATURE_SET_P (opt -> features , zjit ) && !opt -> zjit ) {
2373
- extern void * rb_zjit_init_options (void );
2374
- opt -> zjit = rb_zjit_init_options ();
2371
+ extern void rb_zjit_prepare_options (void );
2372
+ rb_zjit_prepare_options ();
2373
+ opt -> zjit = true;
2375
2374
}
2376
2375
#endif
2377
2376
0 commit comments