summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-10-21 20:41:13 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2021-10-21 20:41:14 -0700
commit6469038ae2ca8a5f0ea8c1274030996240e7df70 (patch)
tree64a51d21734be93e858b59658dcc9aa1601e6f77 /ruby.c
parent844588f9157b364244a7d34ee0fcc70ccc2a7dd9 (diff)
Fix TestRubyOptions#test_enable for -DMJIT_FORCE_ENABLE
--enable=all didn't work when cppflags=-DMJIT_FORCE_ENABLE was given.
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 0a130a3e02..ce0a96abd8 100644
--- a/ruby.c
+++ b/ruby.c
@@ -945,7 +945,12 @@ feature_option(const char *str, int len, void *arg, const unsigned int enable)
if (NAME_MATCH_P(#bit, str, len)) {set |= mask = FEATURE_BIT(bit); FEATURE_FOUND;}
EACH_FEATURES(SET_FEATURE, ;);
if (NAME_MATCH_P("all", str, len)) {
+ // YJIT and MJIT cannot be enabled at the same time. We enable only YJIT for --enable=all.
+#ifdef MJIT_FORCE_ENABLE
+ mask &= ~(FEATURE_BIT(yjit));
+#else
mask &= ~(FEATURE_BIT(jit));
+#endif
goto found;
}
#if AMBIGUOUS_FEATURE_NAMES