summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/scripts/cargo.sh
blob: 947b4a28798f29e5d1846a7d3013e5aa6349bbef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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