3 if [ -z $CHANNEL ]; then
7 pushd $(dirname "$0") >/dev/null
10 # read nightly compiler from rust-toolchain file
11 TOOLCHAIN=$(cat rust-toolchain | grep channel | sed 's/channel = "\(.*\)"/\1/')
15 if [[ $(rustc -V) != $(rustc +${TOOLCHAIN} -V) ]]; then
16 echo "rustc_codegen_gcc is build for $(rustc +${TOOLCHAIN} -V) but the default rustc version is $(rustc -V)."
17 echo "Using $(rustc +${TOOLCHAIN} -V)."
23 RUSTDOCFLAGS="$RUSTFLAGS" cargo +${TOOLCHAIN} $cmd $@