Skip to content

Commit 7319fdb

Browse files
committed
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.
1 parent a121a80 commit 7319fdb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ci/run.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ if [ "${USING_CONTAINER_RUSTC:-}" = 1 ]; then
2525
rustup target add "$target"
2626
fi
2727

28+
# Make all linker warnings errors
29+
if [[ "$target" == *"-apple-"* || "$target" == "thumb"* ]]; then
30+
extra_rustflags=""
31+
else
32+
extra_rustflags=" -Clink-arg=-Wl,--fatal-warnings"
33+
fi
34+
35+
export RUSTFLAGS="${RUSTFLAGS:-}$extra_rustflags"
36+
2837
# Test our implementation
2938
if [ "${BUILD_ONLY:-}" = "1" ]; then
3039
echo "no tests to run for build-only targets"

0 commit comments

Comments
 (0)