|
4 | 4 |
|
5 | 5 | usage() |
6 | 6 | { |
7 | | - echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir <directory>]" |
| 7 | + echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [llvmx[.y]] [--skipunmount] --rootfsdir <directory>]" |
8 | 8 | echo "BuildArch can be: arm(default), armel, arm64, x86" |
9 | 9 | echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.13 or alpine3.14. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen." |
10 | 10 | echo " for FreeBSD can be: freebsd12, freebsd13" |
11 | 11 | echo " for illumos can be: illumos." |
12 | 12 | echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD" |
| 13 | + echo "llvmx[.y] - optional, LLVM version for LLVM related packages." |
13 | 14 | echo "--skipunmount - optional, will skip the unmount of rootfs folder." |
14 | 15 | echo "--use-mirror - optional, use mirror URL to fetch resources, when available." |
15 | 16 | exit 1 |
@@ -48,6 +49,7 @@ __AlpinePackages+=" gettext-dev" |
48 | 49 | __AlpinePackages+=" icu-dev" |
49 | 50 | __AlpinePackages+=" libunwind-dev" |
50 | 51 | __AlpinePackages+=" lttng-ust-dev" |
| 52 | +__AlpinePackages+=" compiler-rt-static" |
51 | 53 |
|
52 | 54 | # CoreFX dependencies |
53 | 55 | __UbuntuPackages+=" libcurl4-openssl-dev" |
@@ -164,6 +166,15 @@ while :; do |
164 | 166 | no-lldb) |
165 | 167 | unset __LLDB_Package |
166 | 168 | ;; |
| 169 | + llvm*) |
| 170 | + version="$(echo "$lowerI" | tr -d '[:alpha:]-=')" |
| 171 | + parts=(${version//./ }) |
| 172 | + __LLVM_MajorVersion="${parts[0]}" |
| 173 | + __LLVM_MinorVersion="${parts[1]}" |
| 174 | + if [[ -z "$__LLVM_MinorVersion" && "$__LLVM_MajorVersion" -le 6 ]]; then |
| 175 | + __LLVM_MinorVersion=0; |
| 176 | + fi |
| 177 | + ;; |
167 | 178 | xenial) # Ubuntu 16.04 |
168 | 179 | if [ "$__CodeName" != "jessie" ]; then |
169 | 180 | __CodeName=xenial |
@@ -261,6 +272,10 @@ if [ "$__BuildArch" == "armel" ]; then |
261 | 272 | fi |
262 | 273 | __UbuntuPackages+=" ${__LLDB_Package:-}" |
263 | 274 |
|
| 275 | +if [ ! -z "$__LLVM_MajorVersion" ]; then |
| 276 | + __UbuntuPackages+=" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev" |
| 277 | +fi |
| 278 | + |
264 | 279 | if [ -z "$__RootfsDir" ] && [ ! -z "$ROOTFS_DIR" ]; then |
265 | 280 | __RootfsDir=$ROOTFS_DIR |
266 | 281 | fi |
|
0 commit comments