diff options
-rw-r--r-- | configure.ac | 97 |
1 files changed, 54 insertions, 43 deletions
@@ -3924,46 +3924,33 @@ AC_ARG_ENABLE(yjit, CARGO= CARGO_BUILD_ARGS= YJIT_LIBS= AS_CASE(["${YJIT_SUPPORT}"], [yes|dev|stats|dev_nodebug], [ AS_IF([test x"$RUSTC" = "xno"], AC_MSG_ERROR([rustc is required. Installation instructions available at https://www.rust-lang.org/tools/install]) ) - AS_IF([test x"$ZJIT_SUPPORT" != "xno"], - AC_MSG_ERROR([YJIT cannot be enabled when ZJIT is enabled]) - ) AS_CASE(["${YJIT_SUPPORT}"], [yes], [ - rb_rust_target_subdir=release ], [dev], [ - rb_rust_target_subdir=debug - CARGO_BUILD_ARGS='--features disasm,runtime_checks' AC_DEFINE(RUBY_DEBUG, 1) ], [dev_nodebug], [ - rb_rust_target_subdir=dev_nodebug - CARGO_BUILD_ARGS='--profile dev_nodebug --features disasm' AC_DEFINE(YJIT_STATS, 1) ], [stats], [ - rb_rust_target_subdir=stats - CARGO_BUILD_ARGS='--profile stats' AC_DEFINE(YJIT_STATS, 1) ]) - AS_IF([test -n "${CARGO_BUILD_ARGS}"], [ - AC_CHECK_TOOL(CARGO, [cargo], [no]) - AS_IF([test x"$CARGO" = "xno"], - AC_MSG_ERROR([cargo is required. Installation instructions available at https://www.rust-lang.org/tools/install]) - ])) - - YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a" - AS_CASE(["$target_os"],[openbsd*],[ - # Link libc++abi (which requires libpthread) for _Unwind_* functions needed by yjit - LDFLAGS="$LDFLAGS -lpthread -lc++abi" - ]) YJIT_OBJ='yjit.$(OBJEXT)' JIT_OBJ='jit.$(OBJEXT)' AS_IF([test x"$YJIT_SUPPORT" != "xyes" ], [ @@ -3974,38 +3961,23 @@ AS_CASE(["${YJIT_SUPPORT}"], AC_DEFINE(USE_YJIT, 0) ]) -ZJIT_CARGO_BUILD_ARGS= ZJIT_LIBS= AS_CASE(["${ZJIT_SUPPORT}"], [yes|dev], [ AS_IF([test x"$RUSTC" = "xno"], AC_MSG_ERROR([rustc is required. Installation instructions available at https://www.rust-lang.org/tools/install]) ) - AS_IF([test x"$YJIT_SUPPORT" != "xno"], - AC_MSG_ERROR([ZJIT cannot be enabled when YJIT is enabled]) - ) AS_CASE(["${ZJIT_SUPPORT}"], [yes], [ - rb_rust_target_subdir=release ], [dev], [ - rb_rust_target_subdir=debug - ZJIT_CARGO_BUILD_ARGS='--profile dev --features disasm' AC_DEFINE(RUBY_DEBUG, 1) ]) - AS_IF([test -n "${ZJIT_CARGO_BUILD_ARGS}"], [ - AC_CHECK_TOOL(CARGO, [cargo], [no]) - AS_IF([test x"$CARGO" = "xno"], - AC_MSG_ERROR([cargo is required. Installation instructions available at https://www.rust-lang.org/tools/install]) - ])) - - ZJIT_LIBS="zjit/target/${rb_rust_target_subdir}/libzjit.a" - AS_CASE(["$target_os"],[openbsd*],[ - # Link libc++abi (which requires libpthread) for _Unwind_* functions needed by yjit - LDFLAGS="$LDFLAGS -lpthread -lc++abi" - ]) ZJIT_OBJ='zjit.$(OBJEXT)' JIT_OBJ='jit.$(OBJEXT)' AS_IF([test x"$ZJIT_SUPPORT" != "xyes" ], [ @@ -4016,18 +3988,57 @@ AS_CASE(["${ZJIT_SUPPORT}"], AC_DEFINE(USE_ZJIT, 0) ]) dnl These variables end up in ::RbConfig::CONFIG -AC_SUBST(YJIT_SUPPORT)dnl what flavor of YJIT the Ruby build includes AC_SUBST(RUSTC)dnl Rust compiler command AC_SUBST(CARGO)dnl Cargo command for Rust builds 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_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_LIBS)dnl for optionally building the Rust parts of ZJIT AC_SUBST(ZJIT_OBJ)dnl for optionally building the C parts of ZJIT AC_SUBST(JIT_OBJ)dnl for optionally building C glue code for Rust FFI } [begin]_group "build section" && { |