summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-07-27 05:07:22 +0900
committerGitHub <noreply@github.com>2020-07-27 05:07:22 +0900
commitb52afaf3a68d4e4de223a3b621641ff14efba365 (patch)
tree961e51e2cc3344778fec1f56c9899e71634d487e
parent04804c7bd04224b7f5bcb4a35d675cb2db7ad410 (diff)
parent53f569989b40d7b39bf8e0bbd5ac216f0b56bb40 (diff)
downloadrust-libc-b52afaf3a68d4e4de223a3b621641ff14efba365.tar.gz
Merge pull request #1840 from JohnTitor/suppress-lint
-rw-r--r--ci/build.sh16
-rw-r--r--libc-test/build.rs8
2 files changed, 13 insertions, 11 deletions
diff --git a/ci/build.sh b/ci/build.sh
index 5043de8c21..8fcf630817 100644
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -43,14 +43,17 @@ test_target() {
if [ "${NO_STD}" != "1" ]; then
cargo "+${RUST}" "${BUILD_CMD}" -vv --no-default-features --target "${TARGET}"
else
- cargo "+${RUST}" "${BUILD_CMD}" -Z build-std=core,alloc -vv --no-default-features --target "${TARGET}"
+ # FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
+ RUSTFLAGS="-A improper_ctypes_definitions" cargo "+${RUST}" "${BUILD_CMD}" \
+ -Z build-std=core,alloc -vv --no-default-features --target "${TARGET}"
fi
# Test that libc builds with default features (e.g. libstd)
# if the target supports libstd
if [ "$NO_STD" != "1" ]; then
cargo "+${RUST}" "${BUILD_CMD}" -vv --target "${TARGET}"
else
- cargo "+${RUST}" "${BUILD_CMD}" -Z build-std=core,alloc -vv --target "${TARGET}"
+ RUSTFLAGS="-A improper_ctypes_definitions" cargo "+${RUST}" "${BUILD_CMD}" \
+ -Z build-std=core,alloc -vv --target "${TARGET}"
fi
# Test that libc builds with the `extra_traits` feature
@@ -58,7 +61,8 @@ test_target() {
cargo "+${RUST}" "${BUILD_CMD}" -vv --no-default-features --target "${TARGET}" \
--features extra_traits
else
- cargo "+${RUST}" "${BUILD_CMD}" -Z build-std=core,alloc -vv --no-default-features \
+ RUSTFLAGS="-A improper_ctypes_definitions" cargo "+${RUST}" "${BUILD_CMD}" \
+ -Z build-std=core,alloc -vv --no-default-features \
--target "${TARGET}" --features extra_traits
fi
@@ -68,7 +72,8 @@ test_target() {
cargo "+${RUST}" "${BUILD_CMD}" -vv --no-default-features --target "${TARGET}" \
--features const-extern-fn
else
- cargo "+${RUST}" "${BUILD_CMD}" -Z build-std=core,alloc -vv --no-default-features \
+ RUSTFLAGS="-A improper_ctypes_definitions" cargo "+${RUST}" "${BUILD_CMD}" \
+ -Z build-std=core,alloc -vv --no-default-features \
--target "${TARGET}" --features const-extern-fn
fi
fi
@@ -78,7 +83,8 @@ test_target() {
cargo "+${RUST}" "${BUILD_CMD}" -vv --target "${TARGET}" \
--features extra_traits
else
- cargo "+${RUST}" "${BUILD_CMD}" -Z build-std=core,alloc -vv --target "${TARGET}" \
+ RUSTFLAGS="-A improper_ctypes_definitions" cargo "+${RUST}" "${BUILD_CMD}" \
+ -Z build-std=core,alloc -vv --target "${TARGET}" \
--features extra_traits
fi
}
diff --git a/libc-test/build.rs b/libc-test/build.rs
index edc13b5409..ed1b176bbf 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -1763,12 +1763,8 @@ fn test_freebsd(target: &str) {
cfg.skip_const(move |name| {
match name {
// These constants are to be introduced in yet-unreleased FreeBSD 12.2.
- "F_ADD_SEALS"
- | "F_GET_SEALS"
- | "F_SEAL_SEAL"
- | "F_SEAL_SHRINK"
- | "F_SEAL_GROW"
- | "F_SEAL_WRITE"
+ "F_ADD_SEALS" | "F_GET_SEALS" | "F_SEAL_SEAL"
+ | "F_SEAL_SHRINK" | "F_SEAL_GROW" | "F_SEAL_WRITE"
if Some(12) <= freebsd_ver =>
{
true