Skip to content

Commit 0744b83

Browse files
sayborasjrajahalme
authored andcommitted
clang: Bump clang version to 17
Upstream distribution no longer lists clang 15 for ubuntu 22.04 [^1]. Additionally, cilium/cilium repo also moves to clang/llvm 17 [^2]. [^1]: https://apt.llvm.org/ [^2]: cilium/cilium#31418 Signed-off-by: Tam Mach <[email protected]>
1 parent 890f927 commit 0744b83

File tree

5 files changed

+38
-38
lines changed

5 files changed

+38
-38
lines changed

Dockerfile.builder

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ RUN apt-get update && \
2727
# Cilium-envoy build dependencies
2828
software-properties-common && \
2929
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
30-
apt-add-repository -y "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" && \
30+
apt-add-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" && \
3131
apt-get update && \
3232
apt-get install -y --no-install-recommends \
33-
clang-15 clang-tools-15 lldb-15 lld-15 clang-format-15 libc++-15-dev libc++abi-15-dev && \
33+
clang-17 clang-tools-17 llvm-17-dev lldb-17 lld-17 clang-format-17 libc++-17-dev libc++abi-17-dev && \
3434
apt-get purge --auto-remove && \
3535
apt-get clean && \
3636
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Dockerfile.builder.tests

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ RUN apt-get update && \
2828
# Cilium-envoy build dependencies
2929
software-properties-common && \
3030
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
31-
apt-add-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" && \
31+
apt-add-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" && \
3232
apt-get update && \
3333
apt-get install -y --no-install-recommends \
34-
clang-15 clang-tools-15 lldb-15 lld-15 clang-format-15 libc++-15-dev libc++abi-15-dev && \
34+
clang-17 clang-tools-17 llvm-17-dev lldb-17 lld-17 clang-format-17 libc++-17-dev libc++abi-17-dev && \
3535
apt-get purge --auto-remove && \
3636
apt-get clean && \
3737
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,17 @@ define add_clang_apt_source
9494
if [ ! -f /etc/apt/trusted.gpg.d/apt.llvm.org.asc ]; then \
9595
$(SUDO) wget -q -O /etc/apt/trusted.gpg.d/apt.llvm.org.asc https://apt.llvm.org/llvm-snapshot.gpg.key; \
9696
fi
97-
apt_source="deb http://apt.llvm.org/$(1)/ llvm-toolchain-$(1)-15 main" && \
97+
apt_source="deb http://apt.llvm.org/$(1)/ llvm-toolchain-$(1)-17 main" && \
9898
$(SUDO) apt-add-repository -y "$${apt_source}" && \
9999
$(SUDO) apt update
100100
endef
101101

102-
/usr/lib/llvm-15:
103-
$(SUDO) apt info clang-15 || $(call add_clang_apt_source,$(shell lsb_release -cs))
104-
$(SUDO) apt install -y clang-15 llvm-15-dev lld-15 clang-format-15
102+
/usr/lib/llvm-17:
103+
$(SUDO) apt info clang-17 || $(call add_clang_apt_source,$(shell lsb_release -cs))
104+
$(SUDO) apt install -y clang-17 llvm-17-dev lld-17 clang-format-17
105105

106-
clang.bazelrc: bazel/setup_clang.sh /usr/lib/llvm-15
107-
bazel/setup_clang.sh /usr/lib/llvm-15
106+
clang.bazelrc: bazel/setup_clang.sh /usr/lib/llvm-17
107+
bazel/setup_clang.sh /usr/lib/llvm-17
108108
echo "build --config=clang" >> $@
109109

110110
.PHONY: bazel-bin/cilium-envoy

Vagrantfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ apt-get update && \
3232
python3 python-is-python3 unzip virtualenv wget zip \
3333
software-properties-common && \
3434
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
35-
apt-add-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" && \
35+
apt-add-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" && \
3636
apt-get update && \
3737
apt-get install -y --no-install-recommends \
38-
clang-15 clang-tools-15 lldb-15 lld-15 clang-format-15 libc++-15-dev libc++abi-15-dev && \
38+
clang-17 clang-tools-17 lldb-17 lld-17 clang-format-17 libc++-17-dev libc++abi-17-dev && \
3939
apt-get purge --auto-remove && \
4040
apt-get clean
4141
SCRIPT

bazel/toolchains/BUILD

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ cc_toolchain_config(
4848
coverage_link_flags = ["--coverage"],
4949
cpu = "aarch64",
5050
cxx_builtin_include_directories = [
51-
"/usr/lib/llvm-15",
51+
"/usr/lib/llvm-17",
5252
"/usr/aarch64-linux-gnu/include",
5353
"/usr/include",
5454
],
@@ -76,18 +76,18 @@ cc_toolchain_config(
7676
target_libc = "glibc",
7777
target_system_name = "aarch64-linux-gnu",
7878
tool_paths = {
79-
"ar": "/usr/bin/llvm-ar-15",
80-
"compat-ld": "/usr/bin/lld-15",
81-
"ld": "/usr/bin/lld-15",
82-
"gold": "/usr/bin/lld-15",
83-
"cpp": "/usr/bin/clang-cpp-15",
84-
"gcc": "/usr/bin/clang-15",
85-
"dwp": "/usr/bin/llvm-dwp-15",
86-
"gcov": "/usr/bin/llvmcov-15",
87-
"nm": "/usr/bin/llvm-nm-15",
88-
"objcopy": "/usr/bin/llvm-objcopy-15",
89-
"objdump": "/usr/bin/llvm-objdump-15",
90-
"strip": "/usr/bin/llvm-strip-15",
79+
"ar": "/usr/bin/llvm-ar-17",
80+
"compat-ld": "/usr/bin/lld-17",
81+
"ld": "/usr/bin/lld-17",
82+
"gold": "/usr/bin/lld-17",
83+
"cpp": "/usr/bin/clang-cpp-17",
84+
"gcc": "/usr/bin/clang-17",
85+
"dwp": "/usr/bin/llvm-dwp-17",
86+
"gcov": "/usr/bin/llvmcov-17",
87+
"nm": "/usr/bin/llvm-nm-17",
88+
"objcopy": "/usr/bin/llvm-objcopy-17",
89+
"objdump": "/usr/bin/llvm-objdump-17",
90+
"strip": "/usr/bin/llvm-strip-17",
9191
},
9292
toolchain_identifier = "linux_aarch64",
9393
unfiltered_compile_flags = [
@@ -146,7 +146,7 @@ cc_toolchain_config(
146146
coverage_link_flags = ["--coverage"],
147147
cpu = "k8",
148148
cxx_builtin_include_directories = [
149-
"/usr/lib/llvm-15",
149+
"/usr/lib/llvm-17",
150150
"/usr/x86_64-linux-gnu/include",
151151
"/usr/include",
152152
],
@@ -174,18 +174,18 @@ cc_toolchain_config(
174174
target_libc = "unknown",
175175
target_system_name = "unknown",
176176
tool_paths = {
177-
"ar": "/usr/bin/llvm-ar-15",
178-
"compat-ld": "/usr/bin/lld-15",
179-
"ld": "/usr/bin/lld-15",
180-
"gold": "/usr/bin/lld-15",
181-
"cpp": "/usr/bin/clang-cpp-15",
182-
"gcc": "/usr/bin/clang-15",
183-
"dwp": "/usr/bin/llvm-dwp-15",
184-
"gcov": "/usr/bin/llvmcov-15",
185-
"nm": "/usr/bin/llvm-nm-15",
186-
"objcopy": "/usr/bin/llvm-objcopy-15",
187-
"objdump": "/usr/bin/llvm-objdump-15",
188-
"strip": "/usr/bin/llvm-strip-15",
177+
"ar": "/usr/bin/llvm-ar-17",
178+
"compat-ld": "/usr/bin/lld-17",
179+
"ld": "/usr/bin/lld-17",
180+
"gold": "/usr/bin/lld-17",
181+
"cpp": "/usr/bin/clang-cpp-17",
182+
"gcc": "/usr/bin/clang-17",
183+
"dwp": "/usr/bin/llvm-dwp-17",
184+
"gcov": "/usr/bin/llvmcov-17",
185+
"nm": "/usr/bin/llvm-nm-17",
186+
"objcopy": "/usr/bin/llvm-objcopy-17",
187+
"objdump": "/usr/bin/llvm-objdump-17",
188+
"strip": "/usr/bin/llvm-strip-17",
189189
},
190190
toolchain_identifier = "linux_x86_64",
191191
unfiltered_compile_flags = [

0 commit comments

Comments
 (0)