diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2022-01-11 17:33:01 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2022-01-11 17:33:01 +0900 |
commit | b5310b8975dffd18a90e149e00673b585101cab8 (patch) | |
tree | c13c6af4aa5e971a4f0d147ab0a771503a1acd6a | |
parent | 3d675c72b9f23791a03bd3b2251e8a2c488b33df (diff) | |
download | ruby-b5310b8975dffd18a90e149e00673b585101cab8.tar.gz |
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.
```
-rw-r--r-- | ruby.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |