From 92c322d74c80e378e38b54bb13aed367c042f748 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 14 Apr 2024 17:42:36 +0900 Subject: [PATCH] tools: Update test.sh to support using patched cg_clif --- tools/test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/test.sh b/tools/test.sh index 28946dc1..4d332ae9 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -183,6 +183,12 @@ cranelift='' if [[ "${RUSTFLAGS:-}" =~ -Z( )?codegen-backend=cranelift ]]; then cranelift='1' rustup ${pre_args[@]+"${pre_args[@]}"} component add rustc-codegen-cranelift-preview &>/dev/null +else + case "$(basename "${cargo}")" in + cargo-clif | cargo-clif.exe) cranelift='1' ;; + esac +fi +if [[ -n "${cranelift}" ]]; then # panic=unwind is not supported yet. # https://github.com/rust-lang/rustc_codegen_cranelift#not-yet-supported flags=' -C panic=abort -Z panic_abort_tests'