2019-07-30 06:37:47 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -z $CHANNEL ]; then
|
|
|
|
export CHANNEL='debug'
|
|
|
|
fi
|
|
|
|
|
|
|
|
pushd $(dirname "$0") >/dev/null
|
|
|
|
source config.sh
|
2020-01-15 11:05:18 -06:00
|
|
|
|
|
|
|
# read nightly compiler from rust-toolchain file
|
|
|
|
TOOLCHAIN=$(cat rust-toolchain)
|
|
|
|
|
2019-07-30 06:37:47 -05:00
|
|
|
popd >/dev/null
|
|
|
|
|
2020-01-15 11:40:24 -06: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 06:37:47 -05:00
|
|
|
cmd=$1
|
|
|
|
shift
|
|
|
|
|
2020-07-13 04:45:16 -05:00
|
|
|
cargo +${TOOLCHAIN} $cmd --target $TARGET_TRIPLE $@
|