summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-07-27 02:46:06 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2020-07-27 02:46:06 +0900
commit09536384edb978930eba7375a5a3d56e93083903 (patch)
tree989b13ce6f0ed9b5ceba70cdb0b90d1a96bcd0eb
parent04804c7bd04224b7f5bcb4a35d675cb2db7ad410 (diff)
downloadrust-libc-09536384edb978930eba7375a5a3d56e93083903.tar.gz
Suppress `improper_ctypes_definitions` for `compiler_builtins`
-rw-r--r--ci/build.sh16
1 files changed, 11 insertions, 5 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
}