summaryrefslogtreecommitdiff
path: root/template
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 /template
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--template/Makefile.in9
1 files changed, 4 insertions, 5 deletions
@@ -107,15 +107,14 @@ JIT_OBJ=@JIT_OBJ@
YJIT_SUPPORT=@YJIT_SUPPORT@
YJIT_LIBS=@YJIT_LIBS@
YJIT_OBJ=@YJIT_OBJ@
-YJIT_LIBOBJ = $(YJIT_LIBS:.a=.@OBJEXT@)
ZJIT_SUPPORT=@ZJIT_SUPPORT@
ZJIT_LIBS=@ZJIT_LIBS@
ZJIT_OBJ=@ZJIT_OBJ@
-ZJIT_LIBOBJ = $(ZJIT_LIBS:.a=.@OBJEXT@)
-CARGO_TARGET_DIR=@abs_top_builddir@/yjit/target
CARGO_BUILD_ARGS=@CARGO_BUILD_ARGS@
-ZJIT_CARGO_BUILD_ARGS=@ZJIT_CARGO_BUILD_ARGS@
-ZJIT_CARGO_TARGET_DIR=@abs_top_builddir@/zjit/target
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXE_LDFLAGS = $(LDFLAGS)
EXTLDFLAGS = @EXTLDFLAGS@