Skip to content

Commit

Permalink
--disable-jit-support should disable YJIT successfully
Browse files Browse the repository at this point in the history
Even if `rustc` is available, it should not be an error unless
`--enable-yjit` is explicitly given.
  • Loading branch information
nobu committed Nov 6, 2022
1 parent cb899a9 commit 9627aab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common.mk
Expand Up @@ -303,7 +303,7 @@ showflags:
" LC_ALL = $(LC_ALL)" \
" LC_CTYPE = $(LC_CTYPE)" \
" MFLAGS = $(MFLAGS)" \
" RUST = $(RUST)" \
" RUSTC = $(RUSTC)" \
" YJIT_RUSTC_ARGS = $(YJIT_RUSTC_ARGS)" \
$(MESSAGE_END)
-@$(CC_VERSION)
Expand Down
16 changes: 10 additions & 6 deletions configure.ac
Expand Up @@ -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],
[

This comment has been minimized.

Copy link
@maximecb

maximecb Nov 7, 2022

Contributor

@nobu I understand what you were trying to do but this breaks the change we just merged.

We want to make it so that YJIT will automatically build if a sufficient rustc is present.

However, after merging this commit, that does not happen when I run ./configure locally on my mac M1.

Next time, could you please @ tag us if you alter the changes that we make and do it through a pull request 🙏

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=
Expand Down

0 comments on commit 9627aab

Please sign in to comment.