Skip to content

Commit 72484cb

Browse files
authored
Allow specifying lldb version > 6 (#10520)
* Allow specifying lldb version > 6 * Recognize Ubuntu focal and jammy
1 parent 70c7444 commit 72484cb

File tree

7 files changed

+89
-18
lines changed

7 files changed

+89
-18
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
2+
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
3+
4+
deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
5+
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
6+
7+
deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
8+
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
9+
10+
deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
11+
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
2+
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
3+
4+
deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
5+
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
6+
7+
deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
8+
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
9+
10+
deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
11+
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
2+
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
3+
4+
deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
5+
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
6+
7+
deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
8+
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
9+
10+
deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
11+
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
2+
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
3+
4+
deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
5+
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
6+
7+
deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
8+
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
9+
10+
deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
11+
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse

eng/common/cross/build-rootfs.sh

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -186,32 +186,27 @@ while :; do
186186
__UbuntuArch=i386
187187
__UbuntuRepo="http://archive.ubuntu.com/ubuntu/"
188188
;;
189-
lldb3.6)
190-
__LLDB_Package="lldb-3.6-dev"
191-
;;
192-
lldb3.8)
193-
__LLDB_Package="lldb-3.8-dev"
194-
;;
195-
lldb3.9)
196-
__LLDB_Package="liblldb-3.9-dev"
197-
;;
198-
lldb4.0)
199-
__LLDB_Package="liblldb-4.0-dev"
200-
;;
201-
lldb5.0)
202-
__LLDB_Package="liblldb-5.0-dev"
203-
;;
204-
lldb6.0)
205-
__LLDB_Package="liblldb-6.0-dev"
189+
lldb*)
190+
version="${lowerI/lldb/}"
191+
parts=(${version//./ })
192+
193+
# for versions > 6.0, lldb has dropped the minor version
194+
if [[ "${parts[0]}" -gt 6 ]]; then
195+
version="${parts[0]}"
196+
fi
197+
198+
__LLDB_Package="liblldb-${version}-dev"
206199
;;
207200
no-lldb)
208201
unset __LLDB_Package
209202
;;
210203
llvm*)
211-
version="$(echo "$lowerI" | tr -d '[:alpha:]-=')"
204+
version="${lowerI/llvm/}"
212205
parts=(${version//./ })
213206
__LLVM_MajorVersion="${parts[0]}"
214207
__LLVM_MinorVersion="${parts[1]}"
208+
209+
# for versions > 6.0, llvm has dropped the minor version
215210
if [[ -z "$__LLVM_MinorVersion" && "$__LLVM_MajorVersion" -le 6 ]]; then
216211
__LLVM_MinorVersion=0;
217212
fi
@@ -231,6 +226,16 @@ while :; do
231226
__CodeName=bionic
232227
fi
233228
;;
229+
focal) # Ubuntu 20.04
230+
if [[ "$__CodeName" != "jessie" ]]; then
231+
__CodeName=focal
232+
fi
233+
;;
234+
jammy) # Ubuntu 22.04
235+
if [[ "$__CodeName" != "jessie" ]]; then
236+
__CodeName=jammy
237+
fi
238+
;;
234239
jessie) # Debian 8
235240
__CodeName=jessie
236241
__UbuntuRepo="http://ftp.debian.org/debian/"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe
2+
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe
3+
4+
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe
5+
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe
6+
7+
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted
8+
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted
9+
10+
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
11+
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe
2+
deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe
3+
4+
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe
5+
deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe
6+
7+
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted
8+
deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted
9+
10+
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
11+
deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse

0 commit comments

Comments
 (0)