build: Bump clang minimum supported version to 17
What changed, and why it matters
This commit simply raises the minimum supported Clang compiler version from 16 to 17 and removes a now-unnecessary C++ deduction guide. It is a routine build-system/maintenance change with no security relevance.
No security action required. Treat as normal build-system maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch updates CI configuration, dependency documentation, and release notes to require Clang 17 instead of Clang 16. It also removes the explicit deduction guide template<class... Ts> Overloaded(Ts...) -> Overloaded<Ts...>; from src/util/overloaded.h, which is redundant in Clang 17+ but was previously needed for Clang 16. No functional code changes are present.
Changed components
ci/test/00_setup_env_native_nowallet_libbitcoinkernel.shdoc/dependencies.mddoc/release-notes-33555.mdsrc/util/overloaded.hInspect captured patch +10 / −8
diff --git a/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh b/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh
index 58561e55..9f7704a9 100755
--- a/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh
+++ b/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh
@@ -7,10 +7,10 @@
export LC_ALL=C.UTF-8
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
-export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:bookworm"
-# Use minimum supported python3.10 (or best-effort 3.11) and clang-16, see doc/dependencies.md
-export PACKAGES="python3-zmq python3-pip clang-16 llvm-16 libc++abi-16-dev libc++-16-dev"
+export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
+# Use minimum supported python3.10 (or best-effort 3.12) and clang-17, see doc/dependencies.md
+export PACKAGES="python3-zmq python3-pip clang-17 llvm-17 libc++abi-17-dev libc++-17-dev"
export PIP_PACKAGES="--break-system-packages pycapnp"
-export DEP_OPTS="NO_WALLET=1 CC=clang-16 CXX='clang++-16 -stdlib=libc++'"
+export DEP_OPTS="NO_WALLET=1 CC=clang-17 CXX='clang++-17 -stdlib=libc++'"
export GOAL="install"
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_LIB=ON -DBUILD_SHARED_LIBS=ON"
diff --git a/doc/dependencies.md b/doc/dependencies.md
index 93916aaf..77391f74 100644
--- a/doc/dependencies.md
+++ b/doc/dependencies.md
@@ -10,7 +10,7 @@ Bitcoin Core requires one of the following compilers.
| Dependency | Minimum required |
| --- | --- |
-| [Clang](https://clang.llvm.org) | [16.0](https://github.com/bitcoin/bitcoin/pull/30263) |
+| [Clang](https://clang.llvm.org) | [17.0](https://github.com/bitcoin/bitcoin/pull/33555) |
| [GCC](https://gcc.gnu.org) | [11.1](https://github.com/bitcoin/bitcoin/pull/29091) |
## Required
diff --git a/doc/release-notes-33555.md b/doc/release-notes-33555.md
new file mode 100644
index 00000000..a11af34f
--- /dev/null
+++ b/doc/release-notes-33555.md
@@ -0,0 +1,5 @@
+Build System
+------------
+
+- The minimum supported Clang compiler version has been raised to 17.0
+ (#33555).
diff --git a/src/util/overloaded.h b/src/util/overloaded.h
index 5bb4b4e5..63c7764a 100644
--- a/src/util/overloaded.h
+++ b/src/util/overloaded.h
@@ -14,9 +14,6 @@ namespace util {
//! Implementation comes from and example usage can be found at
//! https://en.cppreference.com/w/cpp/utility/variant/visit#Example
template<class... Ts> struct Overloaded : Ts... { using Ts::operator()...; };
-
-//! Explicit deduction guide (not needed after clang-17)
-template<class... Ts> Overloaded(Ts...) -> Overloaded<Ts...>;
} // namespace util
#endif // BITCOIN_UTIL_OVERLOADED_H
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.