a288a5ea06
The rust-toolchain file can also store an exact nightly snapshot (instead of just "nightly"), so we can store whatever snapshot that rustc_codegen_cranelift is known to work with. This also lets us add a new feature to `cargo.sh` to let it use the exact same nightly snapshot as cg_clif. If there's a nightly compiler mismatch, you get a confusing error message like: error: couldn't load codegen backend "librustc_codegen_cranelift.so": "librustc_driver-681e2b4f66c73d3e.so: cannot open shared object file: No such file or directory" So doing this automatically in cargo.sh is useful.
19 lines
281 B
Bash
Executable File
19 lines
281 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -z $CHANNEL ]; then
|
|
export CHANNEL='debug'
|
|
fi
|
|
|
|
pushd $(dirname "$0") >/dev/null
|
|
source config.sh
|
|
|
|
# read nightly compiler from rust-toolchain file
|
|
TOOLCHAIN=$(cat rust-toolchain)
|
|
|
|
popd >/dev/null
|
|
|
|
cmd=$1
|
|
shift
|
|
|
|
cargo +${TOOLCHAIN} $cmd --target $TARGET_TRIPLE $@
|