summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-06 15:59:32 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-06 17:07:44 +0900
commit9627aab82524e71b702479b4fa5e24b36cced398 (patch)
treeb05503bae460d3995e54cfeedf8aa8478c9a7b48 /configure.ac
parentcb899a990a02ad86ffc27fa17308fe514cc6415c (diff)
downloadruby-9627aab82524e71b702479b4fa5e24b36cced398.tar.gz
`--disable-jit-support` should disable YJIT successfully
Even if `rustc` is available, it should not be an error unless `--enable-yjit` is explicitly given.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 10 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index bb83865010..8c176db836 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3754,15 +3754,19 @@ AC_ARG_ENABLE(yjit,
AS_HELP_STRING([--enable-yjit],
[enable experimental in-process JIT compiler that requires Rust build tools [default=no]]),
[YJIT_SUPPORT=$enableval],
- [
- AS_IF([test x"$RUSTC" != "xno"],
+ [AS_CASE(["$enable_jit_support:$YJIT_TARGET_OK:$RUSTC"],
+ [no:*|yes:no:*|yes:yes:no], [
+ YJIT_SUPPORT=no
+ ],
+ [yes:yes:*], [
AS_IF([ echo "fn main() { let x = 1; format!(\"{x}\"); }" | $RUSTC - --emit asm=/dev/null ],
- [YJIT_SUPPORT="$YJIT_TARGET_OK"],
+ [YJIT_SUPPORT=yes],
[YJIT_SUPPORT=no]
- ),
+ )
+ ], [
[YJIT_SUPPORT=no]
- )
- ]
+ ]
+ )]
)
CARGO=