From 99407a4057e5176df0e7441c07598f163bea809c Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Wed, 15 Jan 2020 18:40:24 +0100 Subject: [PATCH] Display warning when overriding default rustc version in cargo.sh --- cargo.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cargo.sh b/cargo.sh index 5af23812151..9b83deaf7ab 100755 --- a/cargo.sh +++ b/cargo.sh @@ -12,6 +12,11 @@ TOOLCHAIN=$(cat rust-toolchain) popd >/dev/null +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 + cmd=$1 shift