Skip to content

Commit 1e80811

Browse files
committed
Install FileCheck for older (apt-based) distros.
These older distros/default LLVM versions require the `llvm-${major}-tools` or `llvm-${major}.${minor}-tools` packages, while newer ones install `FileCheck` automatically.
1 parent 44b4c0e commit 1e80811

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/provision_deb.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ packages=(
5656
zlib1g-dev
5757
)
5858

59+
if ! [[ -x "$(llvm-config --bindir)/FileCheck" ]]; then
60+
IFS="." read -r major minor patch <<< "$(llvm-config --version)"
61+
if [[ ${major} -gt 6 ]]; then
62+
tools="llvm-${major}-tools"
63+
else
64+
tools="llvm-${major}.${minor}-tools"
65+
fi
66+
packages+=("${tools}")
67+
fi
68+
5969
apt-get install -qq "${packages[@]}"
6070

6171
apt-get clean # clear apt-caches to reduce image size

0 commit comments

Comments
 (0)