about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/scripts/cargo.sh
blob: dcd40acc02a53369b4332c3920dafa5d61908083 (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