Skip to content

Commit 7de88df

Browse files
committed
tools: Update test.sh to support using patched cg_clif
1 parent c8b612b commit 7de88df

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
@@ -195,6 +195,12 @@ cranelift=''
195195
if [[ "${RUSTFLAGS:-}" =~ -Z( )?codegen-backend=cranelift ]]; then
196196
cranelift='1'
197197
rustup ${pre_args[@]+"${pre_args[@]}"} component add rustc-codegen-cranelift-preview &>/dev/null
198+
else
199+
case "$(basename "${cargo}")" in
200+
cargo-clif | cargo-clif.exe) cranelift='1' ;;
201+
esac
202+
fi
203+
if [[ -n "${cranelift}" ]]; then
198204
# panic=unwind is not supported yet.
199205
# https://github.com/rust-lang/rustc_codegen_cranelift#not-yet-supported
200206
flags=' -C panic=abort -Z panic_abort_tests'

0 commit comments

Comments
 (0)