Skip to content

Commit 77bb494

Browse files
committed
fix disable jit builds, better comment
1 parent 557f96c commit 77bb494

4 files changed

Lines changed: 12 additions & 23 deletions

File tree

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4023,6 +4023,9 @@ AS_IF([test -n "$RUST_LIB"], [
40234023
# Link libc++abi (which requires libpthread) for _Unwind_* functions needed by rust stdlib
40244024
LDFLAGS="$LDFLAGS -lpthread -lc++abi"
40254025
])
4026+
4027+
# absolute path to stop the "target" dir in src dir from interfering through VPATH
4028+
RUST_LIB="$(pwd)/${RUST_LIB}"
40264029
])
40274030

40284031
dnl These variables end up in ::RbConfig::CONFIG

template/Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ ZJIT_OBJ=@ZJIT_OBJ@
112112
RUST_JIT_SUPPORT=@RUST_JIT_SUPPORT@
113113
CARGO_TARGET_DIR=@abs_top_builddir@/target
114114
CARGO_BUILD_ARGS=@CARGO_BUILD_ARGS@
115-
# absolute path to stop the "target" dir in src dir from interfering through VPATH
116-
RUST_LIB=@abs_top_builddir@/@RUST_LIB@
115+
RUST_LIB=@RUST_LIB@
117116
RUST_LIBOBJ = $(RUST_LIB:.a=.@OBJEXT@)
118117
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
119118
EXE_LDFLAGS = $(LDFLAGS)

yjit/yjit.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ YJIT_SRC_FILES = $(wildcard \
1919
# rebuild at the next build.
2020
YJIT_LIB_TOUCH = touch $@
2121

22+
# Absolute path to match RUST_LIB rules to avoid picking
23+
# the "target" dir in the source directory through VPATH.
2224
BUILD_YJIT_LIBS = $(TOP_BUILD_DIR)/$(YJIT_LIBS)
2325

2426
# YJIT_SUPPORT=yes when `configure` gets `--enable-yjit`
@@ -32,13 +34,8 @@ else ifeq ($(YJIT_SUPPORT),no)
3234
$(BUILD_YJIT_LIBS):
3335
$(ECHO) 'Error: Tried to build YJIT without configuring it first. Check `make showconfig`?'
3436
@false
35-
else
3637
endif
3738

38-
39-
#TODO(alan) alias to rust-libobj?
40-
# yjit-libobj: $(YJIT_LIBOBJ)
41-
4239
# By using YJIT_BENCH_OPTS instead of RUN_OPTS, you can skip passing the options to `make install`
4340
YJIT_BENCH_OPTS = $(RUN_OPTS) --enable-gems
4441
YJIT_BENCH = benchmarks/railsbench/benchmark.rb

zjit/zjit.mk

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,20 @@ ZJIT_SRC_FILES = $(wildcard \
1919
# rebuild at the next build.
2020
ZJIT_LIB_TOUCH = touch $@
2121

22+
# Absolute path to match RUST_LIB rules to avoid picking
23+
# the "target" dir in the source directory through VPATH.
24+
BUILD_ZJIT_LIBS = $(TOP_BUILD_DIR)/$(ZJIT_LIBS)
25+
2226
# ZJIT_SUPPORT=yes when `configure` gets `--enable-zjit`
2327
ifeq ($(ZJIT_SUPPORT),yes)
24-
$(ZJIT_LIBS): $(ZJIT_SRC_FILES)
28+
$(BUILD_ZJIT_LIBS): $(ZJIT_SRC_FILES)
2529
$(ECHO) 'building Rust ZJIT (release mode)'
2630
+$(Q) $(RUSTC) $(ZJIT_RUSTC_ARGS)
2731
$(ZJIT_LIB_TOUCH)
2832
else ifeq ($(ZJIT_SUPPORT),no)
29-
$(ZJIT_LIBS):
33+
$(BUILD_ZJIT_LIBS):
3034
$(ECHO) 'Error: Tried to build ZJIT without configuring it first. Check `make showconfig`?'
3135
@false
32-
else ifeq ($(ZJIT_SUPPORT),$(filter dev dev_nodebug stats,$(ZJIT_SUPPORT)))
33-
# NOTE: MACOSX_DEPLOYMENT_TARGET to match `rustc --print deployment-target` to avoid the warning below.
34-
# ld: warning: object file (zjit/target/debug/libzjit.a(<libcapstone object>)) was built for
35-
# newer macOS version (15.2) than being linked (15.0)
36-
# We don't use newer macOS feature as of yet.
37-
$(ZJIT_LIBS): $(ZJIT_SRC_FILES)
38-
$(ECHO) 'building Rust ZJIT ($(ZJIT_SUPPORT) mode)'
39-
+$(Q)$(CHDIR) $(top_srcdir)/zjit && \
40-
CARGO_TARGET_DIR='$(ZJIT_CARGO_TARGET_DIR)' \
41-
CARGO_TERM_PROGRESS_WHEN='never' \
42-
MACOSX_DEPLOYMENT_TARGET=11.0 \
43-
$(CARGO) $(CARGO_VERBOSE) build $(ZJIT_CARGO_BUILD_ARGS)
44-
$(ZJIT_LIB_TOUCH)
45-
else
4636
endif
4737

4838
# By using ZJIT_BENCH_OPTS instead of RUN_OPTS, you can skip passing the options to `make install`

0 commit comments

Comments
 (0)