[前][次][番号順一覧][スレッド一覧]

ruby-changes:69327

From: Takashi <ko1@a...>
Date: Fri, 22 Oct 2021 12:42:19 +0900 (JST)
Subject: [ruby-changes:69327] 6469038ae2 (master): Fix TestRubyOptions#test_enable for -DMJIT_FORCE_ENABLE

https://git.ruby-lang.org/ruby.git/commit/?id=6469038ae2

From 6469038ae2ca8a5f0ea8c1274030996240e7df70 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Thu, 21 Oct 2021 20:41:13 -0700
Subject: Fix TestRubyOptions#test_enable for -DMJIT_FORCE_ENABLE

--enable=all didn't work when cppflags=-DMJIT_FORCE_ENABLE was given.
---
 ruby.c | 5 +++++
 1 file changed, 5 insertions(+)

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) https://github.com/ruby/ruby/blob/trunk/ruby.c#L945
     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
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]