summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorNoah Gibbs <noah.gibbs@shopify.com>2021-10-01 13:45:02 +0100
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:42 -0400
commit21e58acef347bb3891262ab38ac211c8d877efd7 (patch)
tree7328e6df9f224a77e8cf841a92788c9afee727f2 /ruby.c
parent7c08538aa3a366409784f6a8b7aa013b85633803 (diff)
Don't enable YJIT by default. More tests on both Ubuntu and MacOS.
Add RUBY_YJIT_ENABLE env var and YJIT_FORCE_ENABLE compile-time constant. Rename YJIT_STATS to RUBY_YJIT_STATS.
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 6895838f5e..0476135d34 100644
--- a/ruby.c
+++ b/ruby.c
@@ -234,9 +234,14 @@ cmdline_options_init(ruby_cmdline_options_t *opt)
opt->features.set = DEFAULT_FEATURES;
#ifdef MJIT_FORCE_ENABLE /* to use with: ./configure cppflags="-DMJIT_FORCE_ENABLE" */
opt->features.set |= FEATURE_BIT(jit);
-#else
+#elif defined(YJIT_FORCE_ENABLE)
opt->features.set |= FEATURE_BIT(yjit);
#endif
+
+ if(getenv("RUBY_YJIT_ENABLE")) {
+ opt->features.set |= FEATURE_BIT(yjit);
+ }
+
return opt;
}