Skip to content

Commit 9211e57

Browse files
committed
Only fetch std component when there is something to fetch
1 parent 8d1f956 commit 9211e57

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

ci/build.sh

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ echo "Testing Rust ${RUST} on ${OS}"
1313
test_target() {
1414
CARGO="${1}"
1515
TARGET="${2}"
16+
NO_STD="${3}"
1617

1718
opt=
1819
if [ "${TARGET}" = "x86_64-unknown-linux-gnux32" ]; then
@@ -23,14 +24,10 @@ test_target() {
2324
opt="--release"
2425
fi
2526

26-
NO_STD="${3}"
27-
case ${TARGET} in
28-
thumbv*)
29-
NO_STD=1
30-
;;
31-
esac
32-
33-
rustup target add "${TARGET}" --toolchain "${RUST}"
27+
# If there is a std component, fetch it:
28+
if [ "${NO_STD}" != "1" ]; then
29+
rustup target add "${TARGET}" --toolchain "${RUST}"
30+
fi
3431

3532
# Test that libc builds without any default features (no libstd)
3633
"$CARGO" "+${RUST}" build -vv $opt --no-default-features --target "${TARGET}"
@@ -106,12 +103,6 @@ RUST_NIGHTLY_LINUX_TARGETS="\
106103
aarch64-fuchsia \
107104
armv5te-unknown-linux-gnueabi \
108105
armv5te-unknown-linux-musleabi \
109-
thumbv6m-none-eabi \
110-
thumbv7em-none-eabi \
111-
thumbv7em-none-eabihf \
112-
thumbv7m-none-eabi \
113-
thumbv7neon-linux-androideabi \
114-
thumbv7neon-unknown-linux-gnueabihf \
115106
x86_64-fortanix-unknown-sgx \
116107
x86_64-fuchsia \
117108
x86_64-unknown-linux-gnux32 \
@@ -189,6 +180,12 @@ powerpc-unknown-linux-gnuspe \
189180
riscv32imac-unknown-none-elf \
190181
riscv32imc-unknown-none-elf \
191182
sparc64-unknown-netbsd \
183+
thumbv6m-none-eabi \
184+
thumbv7em-none-eabi \
185+
thumbv7em-none-eabihf \
186+
thumbv7m-none-eabi \
187+
thumbv7neon-linux-androideabi \
188+
thumbv7neon-unknown-linux-gnueabihf \
192189
thumbv8m.main-none-eabi \
193190
x86_64-pc-windows-gnu \
194191
x86_64-pc-windows-msvc
@@ -199,6 +196,6 @@ x86_64-unknown-openbsd
199196

200197
if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then
201198
for TARGET in $RUST_LINUX_NO_CORE_TARGETS; do
202-
RUST_LIBC_NO_CORE_BUILD=1 test_target xargo "$TARGET" 1
199+
test_target xargo "$TARGET" 1
203200
done
204201
fi

0 commit comments

Comments
 (0)