diff options
author | Noah Gibbs <noah.gibbs@shopify.com> | 2021-10-01 13:45:02 +0100 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:42 -0400 |
commit | 21e58acef347bb3891262ab38ac211c8d877efd7 (patch) | |
tree | 7328e6df9f224a77e8cf841a92788c9afee727f2 /ruby.c | |
parent | 7c08538aa3a366409784f6a8b7aa013b85633803 (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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; } |