File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99host=" $( rustc -vV | sed -n ' s/^host: //p' ) "
1010machine=" $( uname -m) "
11+ toolchain=" $( rustup show active-toolchain | sed ' s/ .*//' ) "
1112
12- echo " macOS checks: host=$host machine=$machine "
13+ echo " macOS checks: host=$host machine=$machine toolchain= $toolchain "
1314
1415case " $host " in
1516 aarch64-apple-darwin|x86_64-apple-darwin)
@@ -46,9 +47,16 @@ echo "macOS checks: host clippy all features"
4647cargo clippy --all-targets --all-features -- -D warnings
4748
4849for target in aarch64-apple-darwin x86_64-apple-darwin; do
49- if ! rustup target list --installed | grep -qx " $target " ; then
50- echo " macOS checks: installing missing Rust target $target "
51- rustup target add " $target "
50+ if ! rustup target list --installed --toolchain " $toolchain " | grep -qx " $target " ; then
51+ echo " macOS checks: installing missing Rust target $target for $toolchain "
52+ rustup target add --toolchain " $toolchain " " $target "
53+ fi
54+
55+ if ! rustc --target " $target " --print target-libdir > /dev/null 2>&1 ; then
56+ echo " macOS checks: Rust target $target is not usable for $toolchain " >&2
57+ echo " macOS checks: installed targets for $toolchain :" >&2
58+ rustup target list --installed --toolchain " $toolchain " >&2
59+ exit 1
5260 fi
5361
5462 echo " macOS checks: target compile all features for $target "
You can’t perform that action at this time.
0 commit comments