@@ -13,6 +13,7 @@ echo "Testing Rust ${RUST} on ${OS}"
1313test_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="\
106103aarch64-fuchsia \
107104armv5te-unknown-linux-gnueabi \
108105armv5te-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 \
115106x86_64-fortanix-unknown-sgx \
116107x86_64-fuchsia \
117108x86_64-unknown-linux-gnux32 \
@@ -189,6 +180,12 @@ powerpc-unknown-linux-gnuspe \
189180riscv32imac-unknown-none-elf \
190181riscv32imc-unknown-none-elf \
191182sparc64-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 \
192189thumbv8m.main-none-eabi \
193190x86_64-pc-windows-gnu \
194191x86_64-pc-windows-msvc
@@ -199,6 +196,6 @@ x86_64-unknown-openbsd
199196
200197if [ " ${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
204201fi
0 commit comments