Fix compile errors

```
compiling ../ruby.c
../ruby.c:1547:17: error: implicit declaration of function 'setup_yjit_options' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                setup_yjit_options(s, &opt->yjit);
                ^
../ruby.c:1547:17: note: did you mean 'setup_mjit_options'?
../ruby.c:1122:1: note: 'setup_mjit_options' declared here
setup_mjit_options(const char *s, struct mjit_options *mjit_opt)
^
../ruby.c:1547:45: error: no member named 'yjit' in 'struct ruby_cmdline_options'; did you mean 'mjit'?
                setup_yjit_options(s, &opt->yjit);
                                            ^~~~
                                            mjit
../ruby.c:192:25: note: 'mjit' declared here
    struct mjit_options mjit;
                        ^
../ruby.c:1924:28: error: no member named 'yjit' in 'struct ruby_cmdline_options'; did you mean 'mjit'?
        rb_yjit_init(&opt->yjit);
                           ^~~~
                           mjit
../ruby.c:192:25: note: 'mjit' declared here
    struct mjit_options mjit;
                        ^
3 errors generated.
```
This commit is contained in:
Kazuhiro NISHIYAMA 2022-01-11 17:33:01 +09:00
parent 3d675c72b9
commit b5310b8975
No known key found for this signature in database
GPG Key ID: 262ED8DBB4222F7A

4
ruby.c
View File

@ -1542,7 +1542,7 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt)
#endif
}
else if (is_option_with_optarg("yjit", '-', true, false, false)) {
#if USE_MJIT
#if YJIT_SUPPORTED_P
FEATURE_SET(opt->features, FEATURE_BIT(yjit));
setup_yjit_options(s, &opt->yjit);
#else
@ -1921,7 +1921,9 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
exit(1);
}
#endif
#if YJIT_SUPPORTED_P
rb_yjit_init(&opt->yjit);
#endif
}
if (opt->dump & (DUMP_BIT(version) | DUMP_BIT(version_v))) {
#if USE_MJIT