1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix TestRubyOptions#test_enable for -DMJIT_FORCE_ENABLE

--enable=all didn't work when cppflags=-DMJIT_FORCE_ENABLE was given.
This commit is contained in:
Takashi Kokubun 2021-10-21 20:41:13 -07:00
parent 844588f915
commit 6469038ae2
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

5
ruby.c
View file

@ -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