From 386ebe2af501c254a3e3881e576c1774dbe26ce0 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 21 Sep 2022 09:36:36 +0900 Subject: [PATCH 1/8] YJIT: Test Rust 1.58.1 as well on Cirrus --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1e7832ed000716..854a3df98201fb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -90,6 +90,7 @@ yjit_task: matrix: - CC: clang-12 configure: --enable-yjit=dev + rustup_init: --default-toolchain=1.58.1 - CC: gcc-11 configure: --enable-yjit id_script: id @@ -107,7 +108,7 @@ yjit_task: install_rust_script: - sudo apt-get update -y - sudo apt-get install -y curl - - "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y" + - "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y $rustup_init" autogen_script: ./autogen.sh configure_script: >- source $HOME/.cargo/env && ./configure -C From 119618b4728a3b544e614b9b8cb1b492b0fcf848 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 21 Sep 2022 11:28:05 +0900 Subject: [PATCH 2/8] YJIT: Avoid using a Rust 1.60.0 feature --- yjit.c | 12 ++++++++++++ yjit/bindgen/src/main.rs | 1 + yjit/src/cruby_bindings.inc.rs | 3 +++ yjit/src/options.rs | 7 ++----- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/yjit.c b/yjit.c index d3ec27ab1e03fd..63a1025897e729 100644 --- a/yjit.c +++ b/yjit.c @@ -998,6 +998,18 @@ rb_yjit_invalidate_all_method_lookup_assumptions(void) // method caches, so we do nothing here for now. } +bool +rb_yjit_stats_supported(void) +{ + // Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+. + // __ARM_FEATURE_ATOMICS: https://developer.arm.com/documentation/101028/0010/Feature-test-macros +#if defined(__aarch64__) && !defined(__ARM_FEATURE_ATOMICS) + return false; +#else + return true; +#endif +} + // Primitives used by yjit.rb VALUE rb_yjit_stats_enabled_p(rb_execution_context_t *ec, VALUE self); VALUE rb_yjit_trace_exit_locations_enabled_p(rb_execution_context_t *ec, VALUE self); diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs index c3d4a39a2ba656..2a00137a8c0148 100644 --- a/yjit/bindgen/src/main.rs +++ b/yjit/bindgen/src/main.rs @@ -275,6 +275,7 @@ fn main() { .allowlist_function("rb_ENCODING_GET") .allowlist_function("rb_yjit_exit_locations_dict") .allowlist_function("rb_yjit_icache_invalidate") + .allowlist_function("rb_yjit_stats_supported") // from vm_sync.h .allowlist_function("rb_vm_barrier") diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs index f58bf1ca05879b..093d5e38185281 100644 --- a/yjit/src/cruby_bindings.inc.rs +++ b/yjit/src/cruby_bindings.inc.rs @@ -1296,3 +1296,6 @@ extern "C" { line: ::std::os::raw::c_int, ); } +extern "C" { + pub fn rb_yjit_stats_supported() -> bool; +} diff --git a/yjit/src/options.rs b/yjit/src/options.rs index e588876173c90d..74d0c2f6085fde 100644 --- a/yjit/src/options.rs +++ b/yjit/src/options.rs @@ -1,4 +1,5 @@ use std::ffi::CStr; +use crate::cruby::rb_yjit_stats_supported; // Command-line options #[derive(Clone, PartialEq, Eq, Debug)] @@ -153,14 +154,10 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> { ("no-type-prop", "") => unsafe { OPTIONS.no_type_prop = true }, ("stats", "") => { - // Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+. - #[cfg(feature = "stats")] - #[cfg(target_arch = "aarch64")] - if !std::arch::is_aarch64_feature_detected!("lse") { + if unsafe { !rb_yjit_stats_supported() } { eprintln!("Your processor does not support --yjit-stats. Aborting."); std::process::exit(1); } - unsafe { OPTIONS.gen_stats = true } }, From 6b8daf603fc43d17364b499080a440a10ad4b65e Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 21 Sep 2022 11:58:45 +0900 Subject: [PATCH 3/8] YJIT: Use autoconf to detect support --- configure.ac | 21 +++++++++++++++++---- yjit.c | 4 +--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 98231989603eef..bd7d447d1006de 100644 --- a/configure.ac +++ b/configure.ac @@ -3761,10 +3761,23 @@ AS_CASE(["${YJIT_SUPPORT}"], ]) 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]) - ])) + 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]) + ]) + + # Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+. + AC_CACHE_CHECK(yjit stats are broken, rb_cv_broken_yjit_stats, [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ + @%:@ifdef __aarch64__ + asm volatile(".arch armv8-a+lse\nldaddal x0,x0,@<:@sp@:>@"); + @%:@endif + ]])], [rb_cv_broken_yjit_stats=no], [rb_cv_broken_yjit_stats=yes]) + ]) + AS_IF([test "$rb_cv_broken_yjit_stats" = yes], [ + AC_DEFINE(BROKEN_YJIT_STATS, 1) + ]) + ) YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a" YJIT_OBJ='yjit.$(OBJEXT)' diff --git a/yjit.c b/yjit.c index 63a1025897e729..efb6aa77093aab 100644 --- a/yjit.c +++ b/yjit.c @@ -1001,9 +1001,7 @@ rb_yjit_invalidate_all_method_lookup_assumptions(void) bool rb_yjit_stats_supported(void) { - // Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+. - // __ARM_FEATURE_ATOMICS: https://developer.arm.com/documentation/101028/0010/Feature-test-macros -#if defined(__aarch64__) && !defined(__ARM_FEATURE_ATOMICS) +#if defined(BROKEN_YJIT_STATS) return false; #else return true; From 3a524f619b9be531f374a4b1644399c4d40a0aed Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 21 Sep 2022 15:30:07 +0900 Subject: [PATCH 4/8] YJIT: We actually need to run it for checking it properly --- configure.ac | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index bd7d447d1006de..dabc13c9065542 100644 --- a/configure.ac +++ b/configure.ac @@ -3768,15 +3768,19 @@ AS_CASE(["${YJIT_SUPPORT}"], # Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+. AC_CACHE_CHECK(yjit stats are broken, rb_cv_broken_yjit_stats, [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ - @%:@ifdef __aarch64__ - asm volatile(".arch armv8-a+lse\nldaddal x0,x0,@<:@sp@:>@"); - @%:@endif - ]])], [rb_cv_broken_yjit_stats=no], [rb_cv_broken_yjit_stats=yes]) - ]) - AS_IF([test "$rb_cv_broken_yjit_stats" = yes], [ - AC_DEFINE(BROKEN_YJIT_STATS, 1) + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([[]], [[ + @%:@ifdef __aarch64__ + asm volatile(".arch armv8-a+lse\n" + "ldaddal xzr, xzr, @<:@sp@:>@"); + @%:@endif + ]])], + [rb_cv_broken_yjit_stats=no], + [rb_cv_broken_yjit_stats=yes], + [rb_cv_broken_yjit_stats=yes] + ) ]) + AS_IF([test "$rb_cv_broken_yjit_stats" = yes], [AC_DEFINE(BROKEN_YJIT_STATS, 1)]) ) YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a" From 4e2a9ca9a9c83052c23b5e205c91bdf79e88342e Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 23 Sep 2022 06:52:26 +0900 Subject: [PATCH 5/8] YJIT: Try cfg!(target_feature = "lse") --- configure.ac | 25 ++++--------------------- yjit.c | 10 ---------- yjit/bindgen/src/main.rs | 1 - yjit/src/cruby_bindings.inc.rs | 3 --- yjit/src/options.rs | 3 +-- 5 files changed, 5 insertions(+), 37 deletions(-) diff --git a/configure.ac b/configure.ac index dabc13c9065542..98231989603eef 100644 --- a/configure.ac +++ b/configure.ac @@ -3761,27 +3761,10 @@ AS_CASE(["${YJIT_SUPPORT}"], ]) 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]) - ]) - - # Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+. - AC_CACHE_CHECK(yjit stats are broken, rb_cv_broken_yjit_stats, [ - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[]], [[ - @%:@ifdef __aarch64__ - asm volatile(".arch armv8-a+lse\n" - "ldaddal xzr, xzr, @<:@sp@:>@"); - @%:@endif - ]])], - [rb_cv_broken_yjit_stats=no], - [rb_cv_broken_yjit_stats=yes], - [rb_cv_broken_yjit_stats=yes] - ) - ]) - AS_IF([test "$rb_cv_broken_yjit_stats" = yes], [AC_DEFINE(BROKEN_YJIT_STATS, 1)]) - ) + 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" YJIT_OBJ='yjit.$(OBJEXT)' diff --git a/yjit.c b/yjit.c index efb6aa77093aab..d3ec27ab1e03fd 100644 --- a/yjit.c +++ b/yjit.c @@ -998,16 +998,6 @@ rb_yjit_invalidate_all_method_lookup_assumptions(void) // method caches, so we do nothing here for now. } -bool -rb_yjit_stats_supported(void) -{ -#if defined(BROKEN_YJIT_STATS) - return false; -#else - return true; -#endif -} - // Primitives used by yjit.rb VALUE rb_yjit_stats_enabled_p(rb_execution_context_t *ec, VALUE self); VALUE rb_yjit_trace_exit_locations_enabled_p(rb_execution_context_t *ec, VALUE self); diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs index 2a00137a8c0148..c3d4a39a2ba656 100644 --- a/yjit/bindgen/src/main.rs +++ b/yjit/bindgen/src/main.rs @@ -275,7 +275,6 @@ fn main() { .allowlist_function("rb_ENCODING_GET") .allowlist_function("rb_yjit_exit_locations_dict") .allowlist_function("rb_yjit_icache_invalidate") - .allowlist_function("rb_yjit_stats_supported") // from vm_sync.h .allowlist_function("rb_vm_barrier") diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs index 093d5e38185281..f58bf1ca05879b 100644 --- a/yjit/src/cruby_bindings.inc.rs +++ b/yjit/src/cruby_bindings.inc.rs @@ -1296,6 +1296,3 @@ extern "C" { line: ::std::os::raw::c_int, ); } -extern "C" { - pub fn rb_yjit_stats_supported() -> bool; -} diff --git a/yjit/src/options.rs b/yjit/src/options.rs index 74d0c2f6085fde..39a41fa890d583 100644 --- a/yjit/src/options.rs +++ b/yjit/src/options.rs @@ -1,5 +1,4 @@ use std::ffi::CStr; -use crate::cruby::rb_yjit_stats_supported; // Command-line options #[derive(Clone, PartialEq, Eq, Debug)] @@ -154,7 +153,7 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> { ("no-type-prop", "") => unsafe { OPTIONS.no_type_prop = true }, ("stats", "") => { - if unsafe { !rb_yjit_stats_supported() } { + if cfg!(target_arch = "aarch64") && !cfg!(target_feature = "lse") { eprintln!("Your processor does not support --yjit-stats. Aborting."); std::process::exit(1); } From aa4fb0d70a7218c8a838c1fd0e3f146a50f65f87 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 24 Sep 2022 00:33:19 +0900 Subject: [PATCH 6/8] Revert "YJIT: Try cfg!(target_feature = "lse")" This reverts commit 4e2a9ca9a9c83052c23b5e205c91bdf79e88342e. --- configure.ac | 25 +++++++++++++++++++++---- yjit.c | 10 ++++++++++ yjit/bindgen/src/main.rs | 1 + yjit/src/cruby_bindings.inc.rs | 3 +++ yjit/src/options.rs | 3 ++- 5 files changed, 37 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 98231989603eef..dabc13c9065542 100644 --- a/configure.ac +++ b/configure.ac @@ -3761,10 +3761,27 @@ AS_CASE(["${YJIT_SUPPORT}"], ]) 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]) - ])) + 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]) + ]) + + # Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+. + AC_CACHE_CHECK(yjit stats are broken, rb_cv_broken_yjit_stats, [ + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([[]], [[ + @%:@ifdef __aarch64__ + asm volatile(".arch armv8-a+lse\n" + "ldaddal xzr, xzr, @<:@sp@:>@"); + @%:@endif + ]])], + [rb_cv_broken_yjit_stats=no], + [rb_cv_broken_yjit_stats=yes], + [rb_cv_broken_yjit_stats=yes] + ) + ]) + AS_IF([test "$rb_cv_broken_yjit_stats" = yes], [AC_DEFINE(BROKEN_YJIT_STATS, 1)]) + ) YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a" YJIT_OBJ='yjit.$(OBJEXT)' diff --git a/yjit.c b/yjit.c index d3ec27ab1e03fd..efb6aa77093aab 100644 --- a/yjit.c +++ b/yjit.c @@ -998,6 +998,16 @@ rb_yjit_invalidate_all_method_lookup_assumptions(void) // method caches, so we do nothing here for now. } +bool +rb_yjit_stats_supported(void) +{ +#if defined(BROKEN_YJIT_STATS) + return false; +#else + return true; +#endif +} + // Primitives used by yjit.rb VALUE rb_yjit_stats_enabled_p(rb_execution_context_t *ec, VALUE self); VALUE rb_yjit_trace_exit_locations_enabled_p(rb_execution_context_t *ec, VALUE self); diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs index c3d4a39a2ba656..2a00137a8c0148 100644 --- a/yjit/bindgen/src/main.rs +++ b/yjit/bindgen/src/main.rs @@ -275,6 +275,7 @@ fn main() { .allowlist_function("rb_ENCODING_GET") .allowlist_function("rb_yjit_exit_locations_dict") .allowlist_function("rb_yjit_icache_invalidate") + .allowlist_function("rb_yjit_stats_supported") // from vm_sync.h .allowlist_function("rb_vm_barrier") diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs index f58bf1ca05879b..093d5e38185281 100644 --- a/yjit/src/cruby_bindings.inc.rs +++ b/yjit/src/cruby_bindings.inc.rs @@ -1296,3 +1296,6 @@ extern "C" { line: ::std::os::raw::c_int, ); } +extern "C" { + pub fn rb_yjit_stats_supported() -> bool; +} diff --git a/yjit/src/options.rs b/yjit/src/options.rs index 39a41fa890d583..74d0c2f6085fde 100644 --- a/yjit/src/options.rs +++ b/yjit/src/options.rs @@ -1,4 +1,5 @@ use std::ffi::CStr; +use crate::cruby::rb_yjit_stats_supported; // Command-line options #[derive(Clone, PartialEq, Eq, Debug)] @@ -153,7 +154,7 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> { ("no-type-prop", "") => unsafe { OPTIONS.no_type_prop = true }, ("stats", "") => { - if cfg!(target_arch = "aarch64") && !cfg!(target_feature = "lse") { + if unsafe { !rb_yjit_stats_supported() } { eprintln!("Your processor does not support --yjit-stats. Aborting."); std::process::exit(1); } From a13eaebfad5a767c476a03c2bbdb0b3774ad221b Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 24 Sep 2022 00:39:25 +0900 Subject: [PATCH 7/8] YJIT: Add --features stats only when it works --- configure.ac | 10 ++++++---- yjit.c | 10 ---------- yjit/bindgen/src/main.rs | 1 - yjit/src/cruby_bindings.inc.rs | 3 --- yjit/src/options.rs | 11 +---------- 5 files changed, 7 insertions(+), 28 deletions(-) diff --git a/configure.ac b/configure.ac index dabc13c9065542..d6d6add3460983 100644 --- a/configure.ac +++ b/configure.ac @@ -3748,16 +3748,16 @@ AS_CASE(["${YJIT_SUPPORT}"], ], [dev], [ rb_rust_target_subdir=debug - CARGO_BUILD_ARGS='--features stats,disasm,asm_comments' + CARGO_BUILD_ARGS='--features disasm,asm_comments' AC_DEFINE(RUBY_DEBUG, 1) ], [dev_nodebug], [ rb_rust_target_subdir=dev_nodebug - CARGO_BUILD_ARGS='--profile dev_nodebug --features stats,disasm,asm_comments' + CARGO_BUILD_ARGS='--profile dev_nodebug --features disasm,asm_comments' ], [stats], [ rb_rust_target_subdir=stats - CARGO_BUILD_ARGS='--profile stats --features stats' + CARGO_BUILD_ARGS='--profile stats' ]) AS_IF([test -n "${CARGO_BUILD_ARGS}"], [ @@ -3780,7 +3780,9 @@ AS_CASE(["${YJIT_SUPPORT}"], [rb_cv_broken_yjit_stats=yes] ) ]) - AS_IF([test "$rb_cv_broken_yjit_stats" = yes], [AC_DEFINE(BROKEN_YJIT_STATS, 1)]) + AS_IF([test "$rb_cv_broken_yjit_stats" = no], [ + CARGO_BUILD_ARGS="${CARGO_BUILD_ARGS} --features stats" + ]) ) YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a" diff --git a/yjit.c b/yjit.c index efb6aa77093aab..d3ec27ab1e03fd 100644 --- a/yjit.c +++ b/yjit.c @@ -998,16 +998,6 @@ rb_yjit_invalidate_all_method_lookup_assumptions(void) // method caches, so we do nothing here for now. } -bool -rb_yjit_stats_supported(void) -{ -#if defined(BROKEN_YJIT_STATS) - return false; -#else - return true; -#endif -} - // Primitives used by yjit.rb VALUE rb_yjit_stats_enabled_p(rb_execution_context_t *ec, VALUE self); VALUE rb_yjit_trace_exit_locations_enabled_p(rb_execution_context_t *ec, VALUE self); diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs index 2a00137a8c0148..c3d4a39a2ba656 100644 --- a/yjit/bindgen/src/main.rs +++ b/yjit/bindgen/src/main.rs @@ -275,7 +275,6 @@ fn main() { .allowlist_function("rb_ENCODING_GET") .allowlist_function("rb_yjit_exit_locations_dict") .allowlist_function("rb_yjit_icache_invalidate") - .allowlist_function("rb_yjit_stats_supported") // from vm_sync.h .allowlist_function("rb_vm_barrier") diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs index 093d5e38185281..f58bf1ca05879b 100644 --- a/yjit/src/cruby_bindings.inc.rs +++ b/yjit/src/cruby_bindings.inc.rs @@ -1296,6 +1296,3 @@ extern "C" { line: ::std::os::raw::c_int, ); } -extern "C" { - pub fn rb_yjit_stats_supported() -> bool; -} diff --git a/yjit/src/options.rs b/yjit/src/options.rs index 74d0c2f6085fde..f73dca67de21bb 100644 --- a/yjit/src/options.rs +++ b/yjit/src/options.rs @@ -1,5 +1,4 @@ use std::ffi::CStr; -use crate::cruby::rb_yjit_stats_supported; // Command-line options #[derive(Clone, PartialEq, Eq, Debug)] @@ -152,15 +151,7 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> { ("greedy-versioning", "") => unsafe { OPTIONS.greedy_versioning = true }, ("no-type-prop", "") => unsafe { OPTIONS.no_type_prop = true }, - - ("stats", "") => { - if unsafe { !rb_yjit_stats_supported() } { - eprintln!("Your processor does not support --yjit-stats. Aborting."); - std::process::exit(1); - } - unsafe { OPTIONS.gen_stats = true } - }, - + ("stats", "") => unsafe { OPTIONS.gen_stats = true }, ("trace-exits", "") => unsafe { OPTIONS.gen_trace_exits = true; OPTIONS.gen_stats = true }, ("dump-insns", "") => unsafe { OPTIONS.dump_insns = true }, ("verify-ctx", "") => unsafe { OPTIONS.verify_ctx = true }, From 56a24e6f06b679255a2d79ac93d7abb342267f16 Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Fri, 23 Sep 2022 13:46:30 -0400 Subject: [PATCH 8/8] Update configure.ac --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index d6d6add3460983..adbc71bebe2046 100644 --- a/configure.ac +++ b/configure.ac @@ -3780,6 +3780,8 @@ AS_CASE(["${YJIT_SUPPORT}"], [rb_cv_broken_yjit_stats=yes] ) ]) + # This won't enable stats in release builds because we don't use cargo + # for release builds, use rustc directly AS_IF([test "$rb_cv_broken_yjit_stats" = no], [ CARGO_BUILD_ARGS="${CARGO_BUILD_ARGS} --features stats" ])