Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions docker/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ apt-get install -t llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} -y --no-ins
clang-${CLANG_VERSION} \
libclang-rt-${CLANG_VERSION}-dev \
llvm-${CLANG_VERSION}
if [[ "${CLANG_VERSION}" -eq 21 ]]; then
apt-get install -y --no-install-recommends --allow-unauthenticated \
clang-tidy-${CLANG_VERSION}
update-alternatives \
--install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${CLANG_VERSION} 100
update-alternatives \
--install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-${CLANG_VERSION} 100
fi
apt-get clean
rm -rf /var/lib/apt/lists/*
update-alternatives \
Expand Down
13 changes: 2 additions & 11 deletions docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -228,23 +228,14 @@ printf "%s\n" \
"Acquire::AllowWeakRepositories \"true\";" \
| tee /etc/apt/apt.conf.d/99llvm-allow-weak

if [[ "${CLANG_VERSION}" -eq 21 ]]; then
# Add LLVM repository for versions above 20 because it is not available in the default repo
if [[ "${CLANG_VERSION}" -gt 20 ]]; then
apt-get update
# Add LLVM repository for versions above 20 because it is not available in the default repo
apt-get install -y --no-install-recommends lsb-release software-properties-common gnupg
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
DISTRO_CODENAME=$(lsb_release -cs)
echo "deb http://apt.llvm.org/${DISTRO_CODENAME}/ llvm-toolchain-${DISTRO_CODENAME}-${CLANG_VERSION} main" \
| tee /etc/apt/sources.list.d/llvm.list
apt-get update
apt-get install -y --no-install-recommends --allow-unauthenticated \
clang-tidy-${CLANG_VERSION}
update-alternatives \
--install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${CLANG_VERSION} 100
update-alternatives \
--install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-${CLANG_VERSION} 100
apt-get clean
rm -rf /var/lib/apt/lists/*
fi

apt-get update
Expand Down