2019-07-30 13:37:47 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -z $CHANNEL ]; then
|
2020-07-24 14:21:31 +02:00
|
|
|
export CHANNEL='release'
|
2019-07-30 13:37:47 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
pushd $(dirname "$0") >/dev/null
|
2020-09-16 16:46:02 +02:00
|
|
|
source scripts/config.sh
|
2020-01-15 18:05:18 +01:00
|
|
|
|
|
|
|
# read nightly compiler from rust-toolchain file
|
|
|
|
TOOLCHAIN=$(cat rust-toolchain)
|
|
|
|
|
2019-07-30 13:37:47 +02:00
|
|
|
popd >/dev/null
|
|
|
|
|
2020-01-15 18:40:24 +01:00
|
|
|
if [[ $(rustc -V) != $(rustc +${TOOLCHAIN} -V) ]]; then
|
|
|
|
echo "rustc_codegen_cranelift is build for $(rustc +${TOOLCHAIN} -V) but the default rustc version is $(rustc -V)."
|
|
|
|
echo "Using $(rustc +${TOOLCHAIN} -V)."
|
|
|
|
fi
|
|
|
|
|
2019-07-30 13:37:47 +02:00
|
|
|
cmd=$1
|
|
|
|
shift
|
|
|
|
|
2020-04-20 17:13:43 +02:00
|
|
|
cargo +${TOOLCHAIN} $cmd $@
|