Skip to content

Commit 902278b

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 ee92690 commit 902278b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ci/run.sh

+9
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ if [ "${USING_CONTAINER_RUSTC:-}" = 1 ]; then
1919
rustup target add "$target"
2020
fi
2121

22+
# Make all linker warnings errors
23+
if [[ "$target" == *"-apple-"* || "$target" == "thumb"* ]]; then
24+
extra_rustflags=""
25+
else
26+
extra_rustflags=" -Clink-arg=-Wl,--fatal-warnings"
27+
fi
28+
29+
export RUSTFLAGS="${RUSTFLAGS:-}$extra_rustflags"
30+
2231
# Test our implementation
2332
if [ "${NO_STD:-}" = "1" ]; then
2433
echo "nothing to do for no_std"

0 commit comments

Comments
 (0)