mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Use separate cargo build flags
This commit is contained in:
parent
94f572f6b4
commit
92d48f47a3
Notes:
git
2025-04-18 13:49:27 +00:00
3 changed files with 5 additions and 3 deletions
|
@ -3986,11 +3986,11 @@ AS_CASE(["${ZJIT_SUPPORT}"],
|
||||||
],
|
],
|
||||||
[dev], [
|
[dev], [
|
||||||
rb_rust_target_subdir=debug
|
rb_rust_target_subdir=debug
|
||||||
CARGO_BUILD_ARGS='--profile dev'
|
ZJIT_CARGO_BUILD_ARGS='--profile dev --features disasm'
|
||||||
AC_DEFINE(RUBY_DEBUG, 1)
|
AC_DEFINE(RUBY_DEBUG, 1)
|
||||||
])
|
])
|
||||||
|
|
||||||
AS_IF([test -n "${CARGO_BUILD_ARGS}"], [
|
AS_IF([test -n "${ZJIT_CARGO_BUILD_ARGS}"], [
|
||||||
AC_CHECK_TOOL(CARGO, [cargo], [no])
|
AC_CHECK_TOOL(CARGO, [cargo], [no])
|
||||||
AS_IF([test x"$CARGO" = "xno"],
|
AS_IF([test x"$CARGO" = "xno"],
|
||||||
AC_MSG_ERROR([cargo is required. Installation instructions available at https://www.rust-lang.org/tools/install])
|
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
|
||||||
AC_SUBST(RUSTC)dnl Rust compiler command
|
AC_SUBST(RUSTC)dnl Rust compiler command
|
||||||
AC_SUBST(CARGO)dnl Cargo command for Rust builds
|
AC_SUBST(CARGO)dnl Cargo command for Rust builds
|
||||||
AC_SUBST(CARGO_BUILD_ARGS)dnl for selecting Rust build profiles
|
AC_SUBST(CARGO_BUILD_ARGS)dnl for selecting Rust build profiles
|
||||||
|
AC_SUBST(ZJIT_CARGO_BUILD_ARGS)dnl for selecting Rust build profiles
|
||||||
AC_SUBST(YJIT_LIBS)dnl for optionally building the Rust parts of YJIT
|
AC_SUBST(YJIT_LIBS)dnl for optionally building the Rust parts of YJIT
|
||||||
AC_SUBST(YJIT_OBJ)dnl for optionally building the C parts of YJIT
|
AC_SUBST(YJIT_OBJ)dnl for optionally building the C parts of YJIT
|
||||||
AC_SUBST(ZJIT_SUPPORT)dnl what flavor of ZJIT the Ruby build includes
|
AC_SUBST(ZJIT_SUPPORT)dnl what flavor of ZJIT the Ruby build includes
|
||||||
|
|
|
@ -112,6 +112,7 @@ ZJIT_OBJ=@ZJIT_OBJ@
|
||||||
ZJIT_LIBOBJ = $(ZJIT_LIBS:.a=.@OBJEXT@)
|
ZJIT_LIBOBJ = $(ZJIT_LIBS:.a=.@OBJEXT@)
|
||||||
CARGO_TARGET_DIR=@abs_top_builddir@/yjit/target
|
CARGO_TARGET_DIR=@abs_top_builddir@/yjit/target
|
||||||
CARGO_BUILD_ARGS=@CARGO_BUILD_ARGS@
|
CARGO_BUILD_ARGS=@CARGO_BUILD_ARGS@
|
||||||
|
ZJIT_CARGO_BUILD_ARGS=@ZJIT_CARGO_BUILD_ARGS@
|
||||||
ZJIT_CARGO_TARGET_DIR=@abs_top_builddir@/zjit/target
|
ZJIT_CARGO_TARGET_DIR=@abs_top_builddir@/zjit/target
|
||||||
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
|
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
|
||||||
EXE_LDFLAGS = $(LDFLAGS)
|
EXE_LDFLAGS = $(LDFLAGS)
|
||||||
|
|
|
@ -35,7 +35,7 @@ $(ZJIT_LIBS): $(ZJIT_SRC_FILES)
|
||||||
+$(Q)$(CHDIR) $(top_srcdir)/zjit && \
|
+$(Q)$(CHDIR) $(top_srcdir)/zjit && \
|
||||||
CARGO_TARGET_DIR='$(ZJIT_CARGO_TARGET_DIR)' \
|
CARGO_TARGET_DIR='$(ZJIT_CARGO_TARGET_DIR)' \
|
||||||
CARGO_TERM_PROGRESS_WHEN='never' \
|
CARGO_TERM_PROGRESS_WHEN='never' \
|
||||||
$(CARGO) $(CARGO_VERBOSE) build $(CARGO_BUILD_ARGS)
|
$(CARGO) $(CARGO_VERBOSE) build $(ZJIT_CARGO_BUILD_ARGS)
|
||||||
$(ZJIT_LIB_TOUCH)
|
$(ZJIT_LIB_TOUCH)
|
||||||
else
|
else
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue