Skip to content

Commit 0953638

Browse files
committed
Suppress improper_ctypes_definitions for compiler_builtins
1 parent 04804c7 commit 0953638

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

ci/build.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,26 @@ test_target() {
4343
if [ "${NO_STD}" != "1" ]; then
4444
cargo "+${RUST}" "${BUILD_CMD}" -vv --no-default-features --target "${TARGET}"
4545
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}"
4749
fi
4850
# Test that libc builds with default features (e.g. libstd)
4951
# if the target supports libstd
5052
if [ "$NO_STD" != "1" ]; then
5153
cargo "+${RUST}" "${BUILD_CMD}" -vv --target "${TARGET}"
5254
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}"
5457
fi
5558

5659
# Test that libc builds with the `extra_traits` feature
5760
if [ "${NO_STD}" != "1" ]; then
5861
cargo "+${RUST}" "${BUILD_CMD}" -vv --no-default-features --target "${TARGET}" \
5962
--features extra_traits
6063
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 \
6266
--target "${TARGET}" --features extra_traits
6367
fi
6468

@@ -68,7 +72,8 @@ test_target() {
6872
cargo "+${RUST}" "${BUILD_CMD}" -vv --no-default-features --target "${TARGET}" \
6973
--features const-extern-fn
7074
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 \
7277
--target "${TARGET}" --features const-extern-fn
7378
fi
7479
fi
@@ -78,7 +83,8 @@ test_target() {
7883
cargo "+${RUST}" "${BUILD_CMD}" -vv --target "${TARGET}" \
7984
--features extra_traits
8085
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}" \
8288
--features extra_traits
8389
fi
8490
}

0 commit comments

Comments
 (0)