File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,6 @@ target="${1:-}"
66
77export RUST_BACKTRACE=" ${RUST_BACKTRACE:- full} "
88
9- # Make all linker warnings an error
10- export RUSTFLAGS=" ${RUSTFLAGS:- } -Clink-arg=-Wl,--fatal-warnings"
11-
129if [ -z " $target " ]; then
1310 host_target=$( rustc -vV | awk ' /^host/ { print $2 }' )
1411 echo " Defaulted to host target $host_target "
@@ -22,6 +19,17 @@ if [ "${USING_CONTAINER_RUSTC:-}" = 1 ]; then
2219 rustup target add " $target "
2320fi
2421
22+ # Make all linker warnings errors
23+ if [[ " $target " == * " -apple-" * ]]; then
24+ extra_rustflags=" -Clink-arg=-Wl,--fatal_warnings"
25+ elif [[ " $target " == " thumb" * ]]; then
26+ extra_rustflags=" "
27+ else
28+ extra_rustflags=" -Clink-arg=--fatal-warnings"
29+ fi
30+
31+ export RUSTFLAGS=" ${RUSTFLAGS:- } $extra_rustflags "
32+
2533# Test our implementation
2634if [ " ${NO_STD:- } " = " 1" ]; then
2735 echo " nothing to do for no_std"
You can’t perform that action at this time.
0 commit comments