Skip to content

Commit

Permalink
Make all linker warnings errors in CI
Browse files Browse the repository at this point in the history
Give us a better chance of detecting any kind of link issues or
user-visible warnings in advance.
  • Loading branch information
tgross35 committed Sep 28, 2024
1 parent ea86bf9 commit fec26ac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fec26ac

Please sign in to comment.