Skip to content

Commit c738317

Browse files
authored
Fix a bug from #770 (need separate apt-get installs to access llvm-config) (#797)
Use a separate `apt-get install` for installing `FileCheck`, as the detection needs `llvm-config`, which needs `llvm` to be installed first. This fixes a bug from #770.
2 parents 3e69c60 + d314a49 commit c738317

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/provision_deb.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,20 @@ packages=(
4747
zlib1g-dev
4848
)
4949

50+
apt-get install -qq "${packages[@]}"
51+
52+
# needs `llvm-config` from `llvm` package,
53+
# so the main packages need to be installed first
5054
if ! [[ -x "$(llvm-config --bindir)/FileCheck" ]]; then
5155
IFS="." read -r major minor patch <<< "$(llvm-config --version)"
5256
if [[ ${major} -gt 6 ]]; then
5357
tools="llvm-${major}-tools"
5458
else
5559
tools="llvm-${major}.${minor}-tools"
5660
fi
57-
packages+=("${tools}")
61+
apt-get install -qq "${tools}"
5862
fi
5963

60-
apt-get install -qq "${packages[@]}"
61-
6264
apt-get clean # clear apt-caches to reduce image size
6365

6466
python3 -m pip install --upgrade pip

0 commit comments

Comments
 (0)