File tree Expand file tree Collapse file tree 3 files changed +36
-35
lines changed Expand file tree Collapse file tree 3 files changed +36
-35
lines changed Original file line number Diff line number Diff line change 4747 fi
4848fi
4949
50- PREFIX=${target// unknown-/ } -
51- case " $target " in
52- armv7-* )
53- PREFIX=arm-linux-gnueabihf-
54- ;;
55- thumb* )
56- PREFIX=arm-none-eabi-
57- ;;
58- * 86* -* )
59- PREFIX=
60- ;;
61- esac
62-
63- cat << "EOF " > run-rust-nm
64- #!/bin/bash
65-
66- set -x
67-
68- NM=$(find "$(rustc --print sysroot)" \( -name llvm-nm -o -name llvm-nm.exe \) )
69- if [ "$NM" = "" ]; then
70- NM="${PREFIX}nm"
71- fi
72-
73- # i686-pc-windows-gnu tools have a dependency on some DLLs, so run it with
74- # rustup run to ensure that those are in PATH.
75- TOOLCHAIN="$(rustup show active-toolchain | sed 's/ (default)//')"
76- if [[ "$TOOLCHAIN" == *i686-pc-windows-gnu ]]; then
77- NM="rustup run $TOOLCHAIN $NM"
78- fi
79-
80- $NM "$@""
81- EOF
82-
83- chmod +x run-rust-nm
50+ export TARGET=" $target "
8451
8552symcheck=(cargo run -p symbol-check)
8653[[ " $target " = " wasm" * ]] && symcheck+=(--features wasm)
Original file line number Diff line number Diff line change @@ -169,7 +169,8 @@ fn verify_no_duplicates(path: impl AsRef<Path>) {
169169 if !dups. is_empty ( ) {
170170 dups. sort_unstable_by ( |a, b| a. name . cmp ( & b. name ) ) ;
171171
172- Command :: new ( "run-rust-nm" )
172+ Command :: new ( "./run-rust-nm" )
173+ . arg ( std:: env:: var ( "TARGET" ) . unwrap ( ) )
173174 . arg ( path. as_ref ( ) )
174175 . status ( )
175176 . unwrap ( ) ;
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -x
4+
5+ target=" $1 "
6+ shift
7+
8+ PREFIX=${target// unknown-/ } -
9+ case " $target " in
10+ armv7-* )
11+ PREFIX=arm-linux-gnueabihf-
12+ ;;
13+ thumb* )
14+ PREFIX=arm-none-eabi-
15+ ;;
16+ * 86* -* )
17+ PREFIX=
18+ ;;
19+ esac
20+
21+ NM=$( find " $( rustc --print sysroot) " \( -name llvm-nm -o -name llvm-nm.exe \) )
22+ if [ " $NM " = " " ]; then
23+ NM=" ${PREFIX} nm"
24+ fi
25+
26+ # i686-pc-windows-gnu tools have a dependency on some DLLs, so run it with
27+ # rustup run to ensure that those are in PATH.
28+ TOOLCHAIN=" $( rustup show active-toolchain | sed ' s/ (default)//' ) "
29+ if [[ " $TOOLCHAIN " == * i686-pc-windows-gnu ]]; then
30+ NM=" rustup run $TOOLCHAIN $NM "
31+ fi
32+
33+ $NM " $@ "
You can’t perform that action at this time.
0 commit comments