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:-}"
6
6
7
7
export RUST_BACKTRACE=" ${RUST_BACKTRACE:- full} "
8
8
9
- # Make all linker warnings an error
10
- export RUSTFLAGS=" ${RUSTFLAGS:- } -Clink-arg=-Wl,--fatal-warnings"
11
-
12
9
if [ -z " $target " ]; then
13
10
host_target=$( rustc -vV | awk ' /^host/ { print $2 }' )
14
11
echo " Defaulted to host target $host_target "
@@ -22,6 +19,17 @@ if [ "${USING_CONTAINER_RUSTC:-}" = 1 ]; then
22
19
rustup target add " $target "
23
20
fi
24
21
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
+
25
33
# Test our implementation
26
34
if [ " ${NO_STD:- } " = " 1" ]; then
27
35
echo " nothing to do for no_std"
You can’t perform that action at this time.
0 commit comments