Skip to content

Commit 92c322d

Browse files
committed
tools: Update test.sh to support using patched cg_clif
1 parent 4d94b3c commit 92c322d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ cranelift=''
183183
if [[ "${RUSTFLAGS:-}" =~ -Z( )?codegen-backend=cranelift ]]; then
184184
cranelift='1'
185185
rustup ${pre_args[@]+"${pre_args[@]}"} component add rustc-codegen-cranelift-preview &>/dev/null
186+
else
187+
case "$(basename "${cargo}")" in
188+
cargo-clif | cargo-clif.exe) cranelift='1' ;;
189+
esac
190+
fi
191+
if [[ -n "${cranelift}" ]]; then
186192
# panic=unwind is not supported yet.
187193
# https://github.com/rust-lang/rustc_codegen_cranelift#not-yet-supported
188194
flags=' -C panic=abort -Z panic_abort_tests'

0 commit comments

Comments
 (0)