From 0b8c69666916b5bc8727ccb8faf9e4f57641801e 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 057cdb083..b5b11f228 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -19,6 +19,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 [ "${NO_STD:-}" = "1" ]; then echo "nothing to do for no_std"