From 7319fdbf8fb032bce593cffa98fc47a91f6fa0ba Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Sun, 11 Aug 2024 18:33:41 -0500 Subject: [PATCH] Make all linker warnings errors in CI Give us a better chance of detecting any kind of link issues or user-visible warnings in advance. --- ci/run.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci/run.sh b/ci/run.sh index 27b9686ea..bfd56a5ac 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -25,6 +25,15 @@ if [ "${USING_CONTAINER_RUSTC:-}" = 1 ]; then rustup target add "$target" fi +# Make all linker warnings errors +if [[ "$target" == *"-apple-"* || "$target" == "thumb"* ]]; then + extra_rustflags="" +else + extra_rustflags=" -Clink-arg=-Wl,--fatal-warnings" +fi + +export RUSTFLAGS="${RUSTFLAGS:-}$extra_rustflags" + # Test our implementation if [ "${BUILD_ONLY:-}" = "1" ]; then echo "no tests to run for build-only targets"