From 6a6dd26447642028fad4953db52fc1576c2d7569 Mon Sep 17 00:00:00 2001 From: gnzlbg <gonzalobg88@gmail.com> Date: Tue, 19 Feb 2019 14:19:45 +0100 Subject: [PATCH] Only fetch std component when there is something to fetch --- ci/build.sh | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 0666bf14..c97d61a1 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -13,6 +13,7 @@ echo "Testing Rust ${RUST} on ${OS}" test_target() { CARGO="${1}" TARGET="${2}" + NO_STD="${3}" opt= if [ "${TARGET}" = "x86_64-unknown-linux-gnux32" ]; then @@ -23,14 +24,10 @@ test_target() { opt="--release" fi - NO_STD="${3}" - case ${TARGET} in - thumbv*) - NO_STD=1 - ;; - esac - - rustup target add "${TARGET}" --toolchain "${RUST}" + # If there is a std component, fetch it: + if [ "${NO_STD}" != "1" ]; then + rustup target add "${TARGET}" --toolchain "${RUST}" + fi # Test that libc builds without any default features (no libstd) "$CARGO" "+${RUST}" build -vv $opt --no-default-features --target "${TARGET}" @@ -106,12 +103,6 @@ RUST_NIGHTLY_LINUX_TARGETS="\ aarch64-fuchsia \ armv5te-unknown-linux-gnueabi \ 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-fuchsia \ x86_64-unknown-linux-gnux32 \ @@ -189,6 +180,12 @@ powerpc-unknown-linux-gnuspe \ riscv32imac-unknown-none-elf \ riscv32imc-unknown-none-elf \ 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 \ x86_64-pc-windows-gnu \ x86_64-pc-windows-msvc @@ -199,6 +196,6 @@ x86_64-unknown-openbsd if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then 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 fi -- GitLab