Skip to content

Commit 1e3b427

Browse files
committed
combo print, only build one when cargo
1 parent 50f42b1 commit 1e3b427

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ rust-version = "1.85.0"
1313
publish = false # Don't publish to crates.io
1414

1515
[dependencies]
16-
yjit = { path = "yjit" }
17-
zjit = { path = "zjit" }
16+
yjit = { path = "yjit", optional = true }
17+
zjit = { path = "zjit", optional = true }
1818

1919
[lib]
2020
crate-type = ["staticlib"]
@@ -23,8 +23,8 @@ path = "jit.rs"
2323
[features]
2424
disasm = []
2525
runtime_checks = []
26-
yjit = []
27-
zjit = []
26+
yjit = [ "dep:yjit" ]
27+
zjit = [ "dep:zjit" ]
2828

2929
[profile.dev]
3030
opt-level = 0

defs/gmake.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,11 @@ RUST_LIB_TOUCH = touch $@
452452

453453
ifeq ($(RUST_JIT_SUPPORT),$(filter yes dev dev_nodebug stats,$(RUST_JIT_SUPPORT)))
454454
$(RUST_LIB):
455-
$(Q)if [ $(ZJIT_SUPPORT) != no ]; then \
455+
$(Q)if [ '$(ZJIT_SUPPORT)' != no -a '$(YJIT_SUPPORT)' != no ]; then \
456+
echo 'building YJIT and ZJIT ($(RUST_JIT_SUPPORT:yes=release) mode)'; \
457+
elif [ '$(ZJIT_SUPPORT)' != no ]; then \
456458
echo 'building ZJIT ($(RUST_JIT_SUPPORT) mode)'; \
457-
elif [ $(YJIT_SUPPORT) != no ]; then \
459+
elif [ '$(YJIT_SUPPORT)' != no ]; then \
458460
echo 'building YJIT ($(RUST_JIT_SUPPORT) mode)'; \
459461
fi
460462
+$(Q)CARGO_TARGET_DIR='$(CARGO_TARGET_DIR)' \

0 commit comments

Comments
 (0)