mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
YJIT: Improve checking message for rustc version (#6693)
Preivously we didn't have a "checking ...." line for this check and when
rustc was too old, we would dump the error message to the console like:
checking for rustc... rustc
error: there is no argument named `x`
--> <anon>:1:33
|
1 | fn main() { let x = 1; format!("{x}"); }
| ^^^
error: aborting due to previous error
`configure` checks usually don't do this and this might be confusing.
With this commit it now says something like:
checking whether rustc is new enough for YJIT... no
This commit is contained in:
parent
1a65ab20cb
commit
1466682a23
Notes:
git
2022-11-08 20:29:48 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
1 changed files with 3 additions and 1 deletions
|
|
@ -3738,9 +3738,11 @@ AC_CHECK_PROG(RUSTC, [rustc], [rustc], [no]) dnl no ac_tool_prefix
|
|||
dnl check if rustc is recent enough to build YJIT (rustc >= 1.58.0)
|
||||
YJIT_RUSTC_OK=no
|
||||
AS_IF([test "$RUSTC" != "no"],
|
||||
AS_IF([echo "fn main() { let x = 1; format!(\"{x}\"); }" | $RUSTC - --emit asm=/dev/null],
|
||||
AC_MSG_CHECKING([whether ${RUSTC} is new enough for YJIT])
|
||||
AS_IF([echo "fn main() { let x = 1; format!(\"{x}\"); }" | $RUSTC - --emit asm=/dev/null 2>/dev/null],
|
||||
[YJIT_RUSTC_OK=yes]
|
||||
)
|
||||
AC_MSG_RESULT($YJIT_RUSTC_OK)
|
||||
)
|
||||
|
||||
dnl check if we can build YJIT on this target platform
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue