From fec26acb1fdb42ddbf47a519248900c4e6ae7482 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 dcbe1caf..91f2d097 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"