@@ -11,7 +11,8 @@ OS=${TRAVIS_OS_NAME}
11
11
echo " Testing Rust ${RUST} on ${OS} "
12
12
13
13
test_target () {
14
- TARGET=" ${1} "
14
+ CARGO=" ${1} "
15
+ TARGET=" ${2} "
15
16
16
17
opt=
17
18
if [ " ${TARGET} " = " x86_64-unknown-linux-gnux32" ]; then
@@ -22,7 +23,7 @@ test_target() {
22
23
opt=" --release"
23
24
fi
24
25
25
- NO_STD=
26
+ NO_STD=" ${3} "
26
27
case ${TARGET} in
27
28
thumbv* )
28
29
NO_STD=1
@@ -32,25 +33,62 @@ test_target() {
32
33
rustup target add " ${TARGET} " --toolchain " ${RUST} " || true
33
34
34
35
# Test that libc builds without any default features (no libstd)
35
- cargo " +${RUST} " build -vv $opt --no-default-features --target " ${TARGET} "
36
+ " $CARGO " " +${RUST} " build -vv $opt --no-default-features --target " ${TARGET} "
36
37
37
38
# Test that libc builds with default features (e.g. libstd)
38
39
# if the target supports libstd
39
40
if [ " $NO_STD " != " 1" ]; then
40
- cargo " +${RUST} " build -vv $opt --target " ${TARGET} "
41
+ " $CARGO " " +${RUST} " build -vv $opt --target " ${TARGET} "
41
42
fi
42
43
43
44
# Test that libc builds with the `extra_traits` feature
44
- cargo " +${RUST} " build -vv $opt --no-default-features --target " ${TARGET} " \
45
+ " $CARGO " " +${RUST} " build -vv $opt --no-default-features --target " ${TARGET} " \
45
46
--features extra_traits
46
47
47
48
# Also test that it builds with `extra_traits` and default features:
48
49
if [ " $NO_STD " != " 1" ]; then
49
- cargo " +${RUST} " build -vv $opt --target " ${TARGET} " \
50
+ " $CARGO " " +${RUST} " build -vv $opt --target " ${TARGET} " \
50
51
--features extra_traits
51
52
fi
52
53
}
53
54
55
+ rustup component add rust-src || true
56
+ cargo install xargo || true
57
+
58
+
59
+ RUST_LINUX_NO_CORE_TARGETS=" \
60
+ x86_64-unknown-dragonfly \
61
+ aarch64-pc-windows-msvc \
62
+ aarch64-unknown-cloudabi \
63
+ armv7-unknown-cloudabi-eabihf \
64
+ i586-pc-windows-msvc \
65
+ i686-pc-windows-gnu \
66
+ i686-pc-windows-msvc \
67
+ i686-unknown-cloudabi \
68
+ i686-unknown-haiku \
69
+ i686-unknown-netbsd \
70
+ mips-unknown-linux-uclib \
71
+ mipsel-unknown-unknown-linux-uclib \
72
+ nvptx64-nvidia-cuda \
73
+ powerpc-unknown-linux-gnuspe \
74
+ riscv32imac-unknown-none-elf \
75
+ riscv32imc-unknown-none-elf \
76
+ sparc-unknown-linux-gnu \
77
+ sparc64-unknown-netbsd \
78
+ thumbv8m.main-none-eabi \
79
+ x86_64-pc-windows-gnu \
80
+ x86_64-pc-windows-msvc
81
+ x86_64-unknown-bitrig \
82
+ x86_64-unknown-haiku \
83
+ x86_64-unknown-openbsd
84
+ "
85
+
86
+ for TARGET in $RUST_LINUX_NO_CORE_TARGETS ; do
87
+ if [ " ${RUST} " = " nightly" ]; then
88
+ RUST_LIBC_NO_CORE_BUILD=1 test_target xargo " $TARGET " 1
89
+ fi
90
+ done
91
+
54
92
RUST_LINUX_TARGETS=" \
55
93
aarch64-linux-android \
56
94
aarch64-unknown-linux-gnu \
@@ -103,6 +141,12 @@ x86_64-unknown-cloudabi \
103
141
104
142
RUST_NIGHTLY_LINUX_TARGETS=" \
105
143
aarch64-fuchsia \
144
+ armv5te-unknown-linux-gnueabi \
145
+ armv5te-unknown-linux-musleabi \
146
+ armebv7r-none-eabi \
147
+ armebv7r-none-eabihf \
148
+ armv7r-none-eabi \
149
+ armv7r-none-eabihf \
106
150
thumbv6m-none-eabi \
107
151
thumbv7em-none-eabi \
108
152
thumbv7em-none-eabihf \
@@ -161,5 +205,5 @@ case "${OS}" in
161
205
esac
162
206
163
207
for TARGET in $TARGETS ; do
164
- test_target " $TARGET "
208
+ test_target cargo " $TARGET "
165
209
done
0 commit comments