Skip to content

Install FileCheck for older (apt-based) distros #770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 36 additions & 24 deletions scripts/provision_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,43 @@ apt-get install -y --no-install-recommends \
apt-utils \
apt-transport-https \
ca-certificates
# gnupg2: required for gnupg2 key retrieval
# llvm: required for llvm-config
apt-get install -qq \
clang \
cmake \
curl \
dirmngr \
git \
gnupg2 \
gperf \
htop \
libclang-dev \
libssl-dev \
llvm \
ninja-build \
pkg-config \
python-dev \
python3-pip \
python3-setuptools \
software-properties-common \
strace \
unzip \
libncurses5-dev \
luarocks \

packages=(
clang
cmake
curl
dirmngr
git
gnupg2 # required for gnupg2 key retrieval
gperf
htop
libclang-dev
libssl-dev
llvm # required for llvm-config
ninja-build
pkg-config
python-dev
python3-pip
python3-setuptools
software-properties-common
strace
unzip
libncurses5-dev
luarocks
zlib1g-dev
)

if ! [[ -x "$(llvm-config --bindir)/FileCheck" ]]; then
IFS="." read -r major minor patch <<< "$(llvm-config --version)"
if [[ ${major} -gt 6 ]]; then
tools="llvm-${major}-tools"
else
tools="llvm-${major}.${minor}-tools"
fi
packages+=("${tools}")
fi

apt-get install -qq "${packages[@]}"

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

Expand Down