summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2025-05-07 00:19:36 +0900
committerAlan Wu <[email protected]>2025-05-15 00:39:03 +0900
commit92b218fbc379fe85792eb060b71520e271971335 ()
treed5fbb4b7dd49d3388d9cff5fbdccc5effa7e20d3 /vm.c
parentb5575a80bc3849651c395d0ae470eb41dc3aa897 (diff)
YJIT: ZJIT: Allow both JITs in the same build
This commit allows building YJIT and ZJIT simultaneously, a "combo build". Previously, `./configure --enable-yjit --enable-zjit` failed. At runtime, though, only one of the two can be enabled at a time. Add a root Cargo workspace that contains both the yjit and zjit crate. The common Rust build integration mechanisms are factored out into defs/jit.mk. Combo YJIT+ZJIT s are supported; if either JIT uses `--enable-*=dev`, both of them are built in dev mode. The combo build requires Cargo, but building one JIT at a time with only rustc in release build remains supported.
Notes: Merged: https://.com/ruby/ruby/pull/13262
-rw-r--r--vm.c4
1 files changed, 3 insertions, 1 deletions
@@ -452,7 +452,9 @@ jit_compile(rb_execution_context_t *ec)
rb_zjit_compile_iseq(iseq, ec, false);
}
}
-#elif USE_YJIT
// Increment the ISEQ's call counter and trigger JIT compilation if not compiled
if (body->jit_entry == NULL && rb_yjit_enabled_p) {
body->jit_entry_calls++;