diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /vendor/mdbook/ci/install-rust.sh | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 |