rust/compiler/rustc_codegen_cranelift/cargo.sh
bjorn3 ac4f7deb2f Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff25d3dda92'
git-subtree-dir: compiler/rustc_codegen_cranelift
git-subtree-mainline: cf798c1ec6
git-subtree-split: 793d26047f
2020-10-26 09:53:27 +01:00

23 lines
343 B
Bash
Executable File

#!/bin/bash
if [ -z $CHANNEL ]; then
export CHANNEL='release'
fi
pushd $(dirname "$0") >/dev/null
source scripts/config.sh
# read nightly compiler from rust-toolchain file
TOOLCHAIN=$(cat rust-toolchain)
popd >/dev/null
cmd=$1
shift
if [[ "$cmd" = "jit" ]]; then
cargo +${TOOLCHAIN} rustc $@ -- --jit
else
cargo +${TOOLCHAIN} $cmd $@
fi