diff options
Diffstat (limited to 'compiler/rustc_codegen_cranelift/scripts/cargo.sh')
| -rwxr-xr-x | compiler/rustc_codegen_cranelift/scripts/cargo.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/scripts/cargo.sh b/compiler/rustc_codegen_cranelift/scripts/cargo.sh new file mode 100755 index 00000000000..e63daa40f35 --- /dev/null +++ b/compiler/rustc_codegen_cranelift/scripts/cargo.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +dir=$(dirname "$0") +source $dir/config.sh + +# read nightly compiler from rust-toolchain file +TOOLCHAIN=$(cat $dir/rust-toolchain) + +cmd=$1 +shift || true + +if [[ "$cmd" = "jit" ]]; then +cargo +${TOOLCHAIN} rustc $@ -- --jit +else +cargo +${TOOLCHAIN} $cmd $@ +fi |
