Skip to content
Snippets Groups Projects
Commit 6a6dd264 authored by gnzlbg's avatar gnzlbg
Browse files

Only fetch std component when there is something to fetch

parent e3914cf3
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ echo "Testing Rust ${RUST} on ${OS}" ...@@ -13,6 +13,7 @@ echo "Testing Rust ${RUST} on ${OS}"
test_target() { test_target() {
CARGO="${1}" CARGO="${1}"
TARGET="${2}" TARGET="${2}"
NO_STD="${3}"
opt= opt=
if [ "${TARGET}" = "x86_64-unknown-linux-gnux32" ]; then if [ "${TARGET}" = "x86_64-unknown-linux-gnux32" ]; then
...@@ -23,14 +24,10 @@ test_target() { ...@@ -23,14 +24,10 @@ test_target() {
opt="--release" opt="--release"
fi fi
NO_STD="${3}" # If there is a std component, fetch it:
case ${TARGET} in if [ "${NO_STD}" != "1" ]; then
thumbv*) rustup target add "${TARGET}" --toolchain "${RUST}"
NO_STD=1 fi
;;
esac
rustup target add "${TARGET}" --toolchain "${RUST}"
# Test that libc builds without any default features (no libstd) # Test that libc builds without any default features (no libstd)
"$CARGO" "+${RUST}" build -vv $opt --no-default-features --target "${TARGET}" "$CARGO" "+${RUST}" build -vv $opt --no-default-features --target "${TARGET}"
...@@ -106,12 +103,6 @@ RUST_NIGHTLY_LINUX_TARGETS="\ ...@@ -106,12 +103,6 @@ RUST_NIGHTLY_LINUX_TARGETS="\
aarch64-fuchsia \ aarch64-fuchsia \
armv5te-unknown-linux-gnueabi \ armv5te-unknown-linux-gnueabi \
armv5te-unknown-linux-musleabi \ armv5te-unknown-linux-musleabi \
thumbv6m-none-eabi \
thumbv7em-none-eabi \
thumbv7em-none-eabihf \
thumbv7m-none-eabi \
thumbv7neon-linux-androideabi \
thumbv7neon-unknown-linux-gnueabihf \
x86_64-fortanix-unknown-sgx \ x86_64-fortanix-unknown-sgx \
x86_64-fuchsia \ x86_64-fuchsia \
x86_64-unknown-linux-gnux32 \ x86_64-unknown-linux-gnux32 \
...@@ -189,6 +180,12 @@ powerpc-unknown-linux-gnuspe \ ...@@ -189,6 +180,12 @@ powerpc-unknown-linux-gnuspe \
riscv32imac-unknown-none-elf \ riscv32imac-unknown-none-elf \
riscv32imc-unknown-none-elf \ riscv32imc-unknown-none-elf \
sparc64-unknown-netbsd \ sparc64-unknown-netbsd \
thumbv6m-none-eabi \
thumbv7em-none-eabi \
thumbv7em-none-eabihf \
thumbv7m-none-eabi \
thumbv7neon-linux-androideabi \
thumbv7neon-unknown-linux-gnueabihf \
thumbv8m.main-none-eabi \ thumbv8m.main-none-eabi \
x86_64-pc-windows-gnu \ x86_64-pc-windows-gnu \
x86_64-pc-windows-msvc x86_64-pc-windows-msvc
...@@ -199,6 +196,6 @@ x86_64-unknown-openbsd ...@@ -199,6 +196,6 @@ x86_64-unknown-openbsd
if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then
for TARGET in $RUST_LINUX_NO_CORE_TARGETS; do for TARGET in $RUST_LINUX_NO_CORE_TARGETS; do
RUST_LIBC_NO_CORE_BUILD=1 test_target xargo "$TARGET" 1 test_target xargo "$TARGET" 1
done done
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment