Skip to content

Commit d314a49

Browse files
committed
Use a separate apt-get install for installing FileCheck, as the detection needs llvm-config, which needs llvm to be installed first.
1 parent 3e69c60 commit d314a49

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/provision_deb.sh

Lines changed: 5 additions & 3 deletions
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)