rust/compiler/rustc_codegen_cranelift/scripts/cargo.sh

17 lines
273 B
Bash
Raw Normal View History

#!/bin/bash
2020-11-02 11:16:57 -06:00
dir=$(dirname "$0")
source $dir/config.sh
# read nightly compiler from rust-toolchain file
2020-11-02 11:16:57 -06:00
TOOLCHAIN=$(cat $dir/rust-toolchain)
cmd=$1
2020-11-02 11:16:57 -06:00
shift || true
2020-09-29 11:41:59 -05:00
if [[ "$cmd" = "jit" ]]; then
2020-11-02 06:17:52 -06:00
cargo +${TOOLCHAIN} rustc "$@" -- --jit
2020-09-29 11:41:59 -05:00
else
2020-11-02 06:17:52 -06:00
cargo +${TOOLCHAIN} $cmd "$@"
2020-09-29 11:41:59 -05:00
fi