diff options
Diffstat (limited to 'vendor/mdbook/ci/install-rust.sh')
-rwxr-xr-x | vendor/mdbook/ci/install-rust.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/mdbook/ci/install-rust.sh b/vendor/mdbook/ci/install-rust.sh index c608c70d0..d97e45a08 100755 --- a/vendor/mdbook/ci/install-rust.sh +++ b/vendor/mdbook/ci/install-rust.sh @@ -13,6 +13,17 @@ TOOLCHAIN="$1" rustup set profile minimal rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed" rustup update --no-self-update $TOOLCHAIN +if [ -n "$2" ] +then + TARGET="$2" + HOST=$(rustc -Vv | grep ^host: | sed -e "s/host: //g") + if [ "$HOST" != "$TARGET" ] + then + rustup component add llvm-tools-preview --toolchain=$TOOLCHAIN + rustup component add rust-std-$TARGET --toolchain=$TOOLCHAIN + fi +fi + rustup default $TOOLCHAIN rustup -V rustc -Vv |