YJIT: echo "\n" is not portable

It's unspecified by POSIX. zsh and dash give a newline and
bash doesn't substitute it. Attributes don't have to be
followed by a newline anyway, so just remove it.

[Bug #19174]
This commit is contained in:
Alan Wu 2022-12-02 12:24:17 -05:00 committed by GitHub
parent ed1e0c2d13
commit 1015e69d37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3755,7 +3755,7 @@ AS_IF([test "$RUSTC" != "no"],
)
dnl Fails in case rustc target doesn't match ruby target.
dnl Can happen on Rosetta, for example.
AS_IF([echo "#[cfg(target_arch = \"$YJIT_TARGET_ARCH\")]\n fn main() { let x = 1; format!(\"{x}\"); }" |
AS_IF([echo "#[cfg(target_arch = \"$YJIT_TARGET_ARCH\")] fn main() { let x = 1; format!(\"{x}\"); }" |
$RUSTC - --emit asm=/dev/null 2>/dev/null],
[YJIT_RUSTC_OK=yes]
)