Skip to content

Commit 92d48f4

Browse files
committed
Use separate cargo build flags
1 parent 94f572f commit 92d48f4

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

configure.ac

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3986,11 +3986,11 @@ AS_CASE(["${ZJIT_SUPPORT}"],
39863986
],
39873987
[dev], [
39883988
rb_rust_target_subdir=debug
3989-
CARGO_BUILD_ARGS='--profile dev'
3989+
ZJIT_CARGO_BUILD_ARGS='--profile dev --features disasm'
39903990
AC_DEFINE(RUBY_DEBUG, 1)
39913991
])
39923992
3993-
AS_IF([test -n "${CARGO_BUILD_ARGS}"], [
3993+
AS_IF([test -n "${ZJIT_CARGO_BUILD_ARGS}"], [
39943994
AC_CHECK_TOOL(CARGO, [cargo], [no])
39953995
AS_IF([test x"$CARGO" = "xno"],
39963996
AC_MSG_ERROR([cargo is required. Installation instructions available at https://www.rust-lang.org/tools/install])
@@ -4015,6 +4015,7 @@ AC_SUBST(YJIT_SUPPORT)dnl what flavor of YJIT the Ruby build includes
40154015
AC_SUBST(RUSTC)dnl Rust compiler command
40164016
AC_SUBST(CARGO)dnl Cargo command for Rust builds
40174017
AC_SUBST(CARGO_BUILD_ARGS)dnl for selecting Rust build profiles
4018+
AC_SUBST(ZJIT_CARGO_BUILD_ARGS)dnl for selecting Rust build profiles
40184019
AC_SUBST(YJIT_LIBS)dnl for optionally building the Rust parts of YJIT
40194020
AC_SUBST(YJIT_OBJ)dnl for optionally building the C parts of YJIT
40204021
AC_SUBST(ZJIT_SUPPORT)dnl what flavor of ZJIT the Ruby build includes

template/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ ZJIT_OBJ=@ZJIT_OBJ@
112112
ZJIT_LIBOBJ = $(ZJIT_LIBS:.a=.@OBJEXT@)
113113
CARGO_TARGET_DIR=@abs_top_builddir@/yjit/target
114114
CARGO_BUILD_ARGS=@CARGO_BUILD_ARGS@
115+
ZJIT_CARGO_BUILD_ARGS=@ZJIT_CARGO_BUILD_ARGS@
115116
ZJIT_CARGO_TARGET_DIR=@abs_top_builddir@/zjit/target
116117
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
117118
EXE_LDFLAGS = $(LDFLAGS)

zjit/zjit.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $(ZJIT_LIBS): $(ZJIT_SRC_FILES)
3535
+$(Q)$(CHDIR) $(top_srcdir)/zjit && \
3636
CARGO_TARGET_DIR='$(ZJIT_CARGO_TARGET_DIR)' \
3737
CARGO_TERM_PROGRESS_WHEN='never' \
38-
$(CARGO) $(CARGO_VERBOSE) build $(CARGO_BUILD_ARGS)
38+
$(CARGO) $(CARGO_VERBOSE) build $(ZJIT_CARGO_BUILD_ARGS)
3939
$(ZJIT_LIB_TOUCH)
4040
else
4141
endif

0 commit comments

Comments
 (0)