summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgnzlbg <gonzalobg88@gmail.com>2019-02-19 14:19:45 +0100
committergnzlbg <gonzalobg88@gmail.com>2019-02-20 11:21:38 +0100
commit6a6dd26447642028fad4953db52fc1576c2d7569 (patch)
tree5199f5a767efe538f0920a4d5038cc709aa42897
parente3914cf31a4f27fa02845bd59328afff1f7eb5b5 (diff)
downloadrust-libc-6a6dd26447642028fad4953db52fc1576c2d7569.tar.gz
Only fetch std component when there is something to fetch
-rw-r--r--ci/build.sh27
1 files changed, 12 insertions, 15 deletions
diff --git a/ci/build.sh b/ci/build.sh
index 0666bf1416..c97d61a1a9 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