Skip to content

Commit 0ae7247

Browse files
committed
build: migrate clang 17 -> 19
This matches Rust 1.84, but libdatadog recently introduced a flag which was introduced in this version. Although this should not cause a hard failure and libdatadog should be patched, it's also a good idea to upgrade.
1 parent 42c7c25 commit 0ae7247

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

dockerfiles/ci/bookworm/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
BOOKWORM_CURRENT_VERSION=6
2-
BOOKWORM_NEXT_VERSION=6
2+
BOOKWORM_NEXT_VERSION=7

dockerfiles/ci/bookworm/Dockerfile

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ ENV ACCEPT_EULA=Y
99
# with cross-language link-time optimization. Needs to match rustc -Vv's llvm
1010
# version.
1111
ENV DEVLIBS \
12-
libclang-17-dev \
13-
libclang-rt-17-dev \
14-
llvm-17-dev \
15-
lld-17 \
12+
libclang-19-dev \
13+
libclang-rt-19-dev \
14+
llvm-19-dev \
15+
lld-19 \
1616
libbrotli-dev \
1717
libcurl4-openssl-dev \
1818
libedit-dev \
@@ -48,8 +48,8 @@ ENV RUNTIME_DEPS \
4848
apache2 \
4949
apache2-dev \
5050
ca-certificates \
51-
clang-format-17 \
52-
clang-tidy-17 \
51+
clang-format-19 \
52+
clang-tidy-19 \
5353
curl \
5454
debian-goodies \
5555
git \
@@ -70,7 +70,7 @@ ENV RUNTIME_DEPS \
7070
ENV PHPIZE_DEPS \
7171
autoconf \
7272
bison \
73-
clang-17 \
73+
clang-19 \
7474
cmake \
7575
dpkg-dev \
7676
file \
@@ -97,12 +97,12 @@ RUN set -eux; \
9797
echo "deb http://deb.debian.org/debian-debug/ bookworm-debug main" | \
9898
tee -a /etc/apt/sources.list; \
9999
\
100-
# Use LLVM from orig vendor (also LLVM 17 is not shipped with bookworm)
100+
# Use LLVM from orig vendor (also LLVM 19 is not shipped with bookworm)
101101
apt-get update; \
102102
apt-get install -y curl gnupg software-properties-common; \
103103
curl https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc; \
104-
add-apt-repository "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-17 main"; \
105-
add-apt-repository "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-17 main"; \
104+
add-apt-repository "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-19 main"; \
105+
add-apt-repository "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-19 main"; \
106106
\
107107
# prevent Debian's PHP packages from being installed
108108
# https://github.com/docker-library/php/pull/542
@@ -136,14 +136,14 @@ RUN set -eux; \
136136
chown -R circleci:circleci /var/log/nginx/ /var/lib/nginx/; \
137137
\
138138
# Make clang the default compiler
139-
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-17 100; \
140-
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-17 100; \
141-
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100; \
142-
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100; \
143-
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-17 100; \
144-
echo "-L /usr/lib/llvm-17/lib/clang/17/lib/linux" > /usr/lib/llvm-17/bin/clang.cfg; \
139+
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-19 100; \
140+
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-19 100; \
141+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100; \
142+
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100; \
143+
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-19 100; \
144+
echo "-L /usr/lib/llvm-19/lib/clang/19/lib/linux" > /usr/lib/llvm-19/bin/clang.cfg; \
145145
# Include libasan library path
146-
echo /usr/lib/llvm-17/lib/clang/17/lib/linux > /etc/ld.so.conf.d/libasan.conf && ldconfig
146+
echo /usr/lib/llvm-19/lib/clang/19/lib/linux > /etc/ld.so.conf.d/libasan.conf && ldconfig
147147

148148
ENV CMAKE_VERSION="3.24.4"
149149

dockerfiles/ci/centos/7/base.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ RUN source scl_source enable devtoolset-7; set -ex; \
188188
ENV PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/openssl/lib/pkgconfig:/usr/local/zlib/lib/pkgconfig:/usr/local/curl/lib/pkgconfig:/usr/local/sqlite3/lib/pkgconfig"
189189

190190
# Caution, takes a very long time! Since we have to build one from source,
191-
# I picked LLVM 17, which matches Rust 1.76.
191+
# I picked LLVM 19, which matches Rust 1.84.
192192
# Ordinarily we leave sources, but LLVM is 2GiB just for the sources...
193193
# Minimum: libclang. Nice-to-have: full toolchain including linker to play
194194
# with cross-language link-time optimization. Needs to match rustc -Vv's llvm
@@ -204,7 +204,7 @@ RUN source scl_source enable devtoolset-9 \
204204
&& cd - \
205205
&& rm -fr "${SRC_DIR}/ninja" \
206206
&& cd /usr/local/src \
207-
&& git clone --depth 1 -b release/17.x https://github.com/llvm/llvm-project.git \
207+
&& git clone --depth 1 -b release/19.x https://github.com/llvm/llvm-project.git \
208208
&& mkdir -vp llvm-project/build \
209209
&& cd llvm-project/build \
210210
&& cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ../llvm \

0 commit comments

Comments
 (0)