Add --enable-yjit=dev_nodebug configure option

This commit is contained in:
John Hawthorn 2022-07-29 15:07:06 -07:00
parent fbd24793cb
commit 0e85586ecc
Notes: git 2022-07-30 08:32:35 +09:00
3 changed files with 10 additions and 2 deletions

View File

@ -3736,7 +3736,7 @@ CARGO=
CARGO_BUILD_ARGS= CARGO_BUILD_ARGS=
YJIT_LIBS= YJIT_LIBS=
AS_CASE(["${YJIT_SUPPORT}"], AS_CASE(["${YJIT_SUPPORT}"],
[yes|dev|stats], [ [yes|dev|stats|dev_nodebug], [
AS_IF([test x"$enable_jit_support" = "xno"], AS_IF([test x"$enable_jit_support" = "xno"],
AC_MSG_ERROR([--disable-jit-support but --enable-yjit. YJIT requires JIT support]) AC_MSG_ERROR([--disable-jit-support but --enable-yjit. YJIT requires JIT support])
) )
@ -3754,9 +3754,13 @@ AS_CASE(["${YJIT_SUPPORT}"],
CARGO_BUILD_ARGS='--features stats,disasm,asm_comments' CARGO_BUILD_ARGS='--features stats,disasm,asm_comments'
AC_DEFINE(RUBY_DEBUG, 1) AC_DEFINE(RUBY_DEBUG, 1)
], ],
[dev_nodebug], [
rb_rust_target_subdir=dev_nodebug
CARGO_BUILD_ARGS='--profile dev_nodebug --features stats,disasm,asm_comments'
],
[stats], [ [stats], [
rb_rust_target_subdir=stats rb_rust_target_subdir=stats
CARGO_BUILD_ARGS='--profile stats --features stats,disasm,asm_comments' CARGO_BUILD_ARGS='--profile stats --features stats'
]) ])
AS_IF([test -n "${CARGO_BUILD_ARGS}"], [ AS_IF([test -n "${CARGO_BUILD_ARGS}"], [

View File

@ -33,6 +33,9 @@ overflow-checks = true
[profile.stats] [profile.stats]
inherits = "release" inherits = "release"
[profile.dev_nodebug]
inherits = "release"
[profile.release] [profile.release]
# NOTE: --enable-yjit builds use `rustc` without going through Cargo. You # NOTE: --enable-yjit builds use `rustc` without going through Cargo. You
# might want to update the `rustc` invocation if you change this profile. # might want to update the `rustc` invocation if you change this profile.

View File

@ -33,6 +33,7 @@ yjit-static-lib-cargo:
$(CARGO) $(CARGO_VERBOSE) build $(CARGO_BUILD_ARGS) $(CARGO) $(CARGO_VERBOSE) build $(CARGO_BUILD_ARGS)
yjit-static-lib-dev: yjit-static-lib-cargo yjit-static-lib-dev: yjit-static-lib-cargo
yjit-static-lib-dev_nodebug: yjit-static-lib-cargo
yjit-static-lib-stats: yjit-static-lib-cargo yjit-static-lib-stats: yjit-static-lib-cargo
# This PHONY prerequisite makes it so that we always run cargo. When there are # This PHONY prerequisite makes it so that we always run cargo. When there are