@@ -43,22 +43,26 @@ test_target() {
43
43
if [ " ${NO_STD} " != " 1" ]; then
44
44
cargo " +${RUST} " " ${BUILD_CMD} " -vv --no-default-features --target " ${TARGET} "
45
45
else
46
- cargo " +${RUST} " " ${BUILD_CMD} " -Z build-std=core,alloc -vv --no-default-features --target " ${TARGET} "
46
+ # FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
47
+ RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
48
+ -Z build-std=core,alloc -vv --no-default-features --target " ${TARGET} "
47
49
fi
48
50
# Test that libc builds with default features (e.g. libstd)
49
51
# if the target supports libstd
50
52
if [ " $NO_STD " != " 1" ]; then
51
53
cargo " +${RUST} " " ${BUILD_CMD} " -vv --target " ${TARGET} "
52
54
else
53
- cargo " +${RUST} " " ${BUILD_CMD} " -Z build-std=core,alloc -vv --target " ${TARGET} "
55
+ RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
56
+ -Z build-std=core,alloc -vv --target " ${TARGET} "
54
57
fi
55
58
56
59
# Test that libc builds with the `extra_traits` feature
57
60
if [ " ${NO_STD} " != " 1" ]; then
58
61
cargo " +${RUST} " " ${BUILD_CMD} " -vv --no-default-features --target " ${TARGET} " \
59
62
--features extra_traits
60
63
else
61
- cargo " +${RUST} " " ${BUILD_CMD} " -Z build-std=core,alloc -vv --no-default-features \
64
+ RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
65
+ -Z build-std=core,alloc -vv --no-default-features \
62
66
--target " ${TARGET} " --features extra_traits
63
67
fi
64
68
@@ -68,7 +72,8 @@ test_target() {
68
72
cargo " +${RUST} " " ${BUILD_CMD} " -vv --no-default-features --target " ${TARGET} " \
69
73
--features const-extern-fn
70
74
else
71
- cargo " +${RUST} " " ${BUILD_CMD} " -Z build-std=core,alloc -vv --no-default-features \
75
+ RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
76
+ -Z build-std=core,alloc -vv --no-default-features \
72
77
--target " ${TARGET} " --features const-extern-fn
73
78
fi
74
79
fi
@@ -78,7 +83,8 @@ test_target() {
78
83
cargo " +${RUST} " " ${BUILD_CMD} " -vv --target " ${TARGET} " \
79
84
--features extra_traits
80
85
else
81
- cargo " +${RUST} " " ${BUILD_CMD} " -Z build-std=core,alloc -vv --target " ${TARGET} " \
86
+ RUSTFLAGS=" -A improper_ctypes_definitions" cargo " +${RUST} " " ${BUILD_CMD} " \
87
+ -Z build-std=core,alloc -vv --target " ${TARGET} " \
82
88
--features extra_traits
83
89
fi
84
90
}
0 commit comments