File tree 1 file changed +19
-14
lines changed
1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change 3
3
# Exit if anything fails
4
4
set -e
5
5
6
- # Find out where to look for the pretty printer Python module
7
- RUSTC_SYSROOT=` rustc --print sysroot`
8
-
9
6
# Find the host triple so we can find lldb in rustlib.
10
- host=` rustc -vV | sed -n -e ' s/^host: //p' `
7
+ host=$( rustc -vV | sed -n -e ' s/^host: //p' )
8
+
9
+ # Find out where to look for the pretty printer Python module
10
+ RUSTC_SYSROOT=$( rustc --print sysroot)
11
+ RUST_LLDB=" $RUSTC_SYSROOT /lib/rustlib/$host /bin/lldb"
11
12
12
13
lldb=lldb
13
- if [ -f " $RUSTC_SYSROOT /lib/rustlib/ $host /bin/lldb " ]; then
14
- lldb=" $RUSTC_SYSROOT /lib/rustlib/ $host /bin/lldb "
14
+ if [ -f " $RUST_LLDB " ]; then
15
+ lldb=" $RUST_LLDB "
15
16
else
16
- LLDB_VERSION=` " $lldb " --version 2> /dev/null | head -1 | cut -d. -f1`
17
+ if ! command -v " $lldb " > /dev/null; then
18
+ echo " $lldb not found! Please install it." >&2
19
+ exit 1
20
+ else
21
+ LLDB_VERSION=$( " $lldb " --version | cut -d ' ' -f3)
17
22
18
- if [ " $LLDB_VERSION " = " lldb-350 " ]
19
- then
20
- echo " ***"
21
- echo \
22
- " WARNING: This version of LLDB has known issues with Rust and cannot \
23
- display the contents of local variables! "
24
- echo " *** "
23
+ if [ " $LLDB_VERSION " = " 3.5.0 " ]; then
24
+ cat << EOF >&2
25
+ ***
26
+ WARNING: This version of LLDB has known issues with Rust and cannot display the contents of local variables!
27
+ ***
28
+ EOF
29
+ fi
25
30
fi
26
31
fi
27
32
You can’t perform that action at this time.
0 commit comments