summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-10-15 17:15:42 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:43 -0400
commit95e337f815b68b50d4455c4c9a8722b8794bfffa (patch)
treef466e04defc67b6efc890455e62c5b8df1cee1d7 /ruby.c
parentff863f3818dfc8576f72f2a794756bc3b96fdbe9 (diff)
Warn when trying to use YJIT in --disable-jit-support builds
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index f3c01bef0d..5f756ebbc8 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1505,7 +1505,11 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt)
#endif
}
else if (strcmp("yjit", s) == 0 || setup_yjit_options(s, &opt->yjit)) {
+#if USE_MJIT
FEATURE_SET(opt->features, FEATURE_BIT(yjit));
+#else
+ rb_warn("Ruby was built without JIT support");
+#endif
}
else if (strcmp("yydebug", s) == 0) {
if (envopt) goto noenvopt_long;