Skip to content

Commit

Permalink
Merge pull request rust-lang#1840 from JohnTitor/suppress-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor authored Jul 26, 2020
2 parents 04804c7 + 53f5699 commit b52afaf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
16 changes: 11 additions & 5 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,26 @@ 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
if [ "${NO_STD}" != "1" ]; then
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

Expand All @@ -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
Expand All @@ -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
}
Expand Down
8 changes: 2 additions & 6 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b52afaf

Please sign in to comment.