Skip to content

Commit b52afaf

Browse files
authored
Merge pull request #1840 from JohnTitor/suppress-lint
2 parents 04804c7 + 53f5699 commit b52afaf

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

ci/build.sh

+11-5
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
}

libc-test/build.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1763,12 +1763,8 @@ fn test_freebsd(target: &str) {
17631763
cfg.skip_const(move |name| {
17641764
match name {
17651765
// These constants are to be introduced in yet-unreleased FreeBSD 12.2.
1766-
"F_ADD_SEALS"
1767-
| "F_GET_SEALS"
1768-
| "F_SEAL_SEAL"
1769-
| "F_SEAL_SHRINK"
1770-
| "F_SEAL_GROW"
1771-
| "F_SEAL_WRITE"
1766+
"F_ADD_SEALS" | "F_GET_SEALS" | "F_SEAL_SEAL"
1767+
| "F_SEAL_SHRINK" | "F_SEAL_GROW" | "F_SEAL_WRITE"
17721768
if Some(12) <= freebsd_ver =>
17731769
{
17741770
true

0 commit comments

Comments
 (0)