@@ -11,6 +11,7 @@ set -ex
11
11
: " ${OS?The OS environment variable must be set.} "
12
12
13
13
RUST=${TOOLCHAIN}
14
+ VERBOSE=-v
14
15
15
16
echo " Testing Rust ${RUST} on ${OS} "
16
17
@@ -41,50 +42,50 @@ test_target() {
41
42
42
43
# Test that libc builds without any default features (no std)
43
44
if [ " ${NO_STD} " != " 1" ]; then
44
- cargo " +${RUST} " " ${BUILD_CMD} " -vv --no-default-features --target " ${TARGET} "
45
+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --no-default-features --target " ${TARGET} "
45
46
else
46
47
# FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
47
48
RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
48
- -Z build-std=core,alloc -vv --no-default-features --target " ${TARGET} "
49
+ -Z build-std=core,alloc " $VERBOSE " --no-default-features --target " ${TARGET} "
49
50
fi
50
51
# Test that libc builds with default features (e.g. std)
51
52
# if the target supports std
52
53
if [ " $NO_STD " != " 1" ]; then
53
- cargo " +${RUST} " " ${BUILD_CMD} " -vv --target " ${TARGET} "
54
+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --target " ${TARGET} "
54
55
else
55
56
RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
56
- -Z build-std=core,alloc -vv --target " ${TARGET} "
57
+ -Z build-std=core,alloc " $VERBOSE " --target " ${TARGET} "
57
58
fi
58
59
59
60
# Test that libc builds with the `extra_traits` feature
60
61
if [ " ${NO_STD} " != " 1" ]; then
61
- cargo " +${RUST} " " ${BUILD_CMD} " -vv --no-default-features --target " ${TARGET} " \
62
+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --no-default-features --target " ${TARGET} " \
62
63
--features extra_traits
63
64
else
64
65
RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
65
- -Z build-std=core,alloc -vv --no-default-features \
66
+ -Z build-std=core,alloc " $VERBOSE " --no-default-features \
66
67
--target " ${TARGET} " --features extra_traits
67
68
fi
68
69
69
70
# Test the 'const-extern-fn' feature on nightly
70
71
if [ " ${RUST} " = " nightly" ]; then
71
72
if [ " ${NO_STD} " != " 1" ]; then
72
- cargo " +${RUST} " " ${BUILD_CMD} " -vv --no-default-features --target " ${TARGET} " \
73
+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --no-default-features --target " ${TARGET} " \
73
74
--features const-extern-fn
74
75
else
75
76
RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
76
- -Z build-std=core,alloc -vv --no-default-features \
77
+ -Z build-std=core,alloc " $VERBOSE " --no-default-features \
77
78
--target " ${TARGET} " --features const-extern-fn
78
79
fi
79
80
fi
80
81
81
82
# Also test that it builds with `extra_traits` and default features:
82
83
if [ " $NO_STD " != " 1" ]; then
83
- cargo " +${RUST} " " ${BUILD_CMD} " -vv --target " ${TARGET} " \
84
+ cargo " +${RUST} " " ${BUILD_CMD} " " $VERBOSE " --target " ${TARGET} " \
84
85
--features extra_traits
85
86
else
86
87
RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
87
- -Z build-std=core,alloc -vv --target " ${TARGET} " \
88
+ -Z build-std=core,alloc " $VERBOSE " --target " ${TARGET} " \
88
89
--features extra_traits
89
90
fi
90
91
}
0 commit comments