build: Bump clang minimum supported version to 19 #36036

Manually merged
maflcko merged 5 commits from 2608-clang-19 into master 2026-11-06 09:13:52 +00:00 AGit
maflcko commented 2026-08-20 13:47:21 +00:00 (Migrated from github.com)

Most supported operating systems ship with clang-19 (or later), so bump the minimum to that and allow new code to drop workarounds for previous clang bugs.

(For this bump, only C++20 CTAD will become available.)

This patch will only be released in version 33.x, next year (2027).

For reference:

On operating systems where the minimum Clang version is not shipped by default, the user would have to use GCC, or install Clang in a different way. For example:

Most supported operating systems ship with clang-19 (or later), so bump the minimum to that and allow new code to drop workarounds for previous clang bugs. (For this bump, only C++20 CTAD will become available.) This patch will only be released in version 33.x, next year (2027). For reference: * https://packages.debian.org/bookworm/clang-22 * https://packages.ubuntu.com/noble/clang-20 * CentOS-like 8/9/10 ship clang-21 via Stream * Free/Open/Net*BSD ship clang-19 * OpenSuse Tumbleweed ships with https://software.opensuse.org/package/clang (clang22); leap:latest with clang-19 * macOS 14: depends/release cross-builds are unaffected and use clang-19 * macOS 14: Native builds use llvm-19-ish via XCode CLT 26.3 since https://github.com/bitcoin/bitcoin/pull/36287 * Windows: VS ships Clang 22 On operating systems where the minimum Clang version is not shipped by default, the user would have to use GCC, or install Clang in a different way. For example: * https://packages.debian.org/bookworm/g++ (g++-12) * https://packages.ubuntu.com/jammy/g++-12 * https://apt.llvm.org/, brew, nix, guix, or compile clang from source, ...
DrahtBot commented 2026-08-20 13:47:29 +00:00 (Migrated from github.com)

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK fanquake, hebasto
Concept ACK l0rinc, winterrdog

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36042 (build: Bump g++ minimum supported version to 13 by maflcko)
  • #36033 ([wip,nomerge,rfc] build: Require C++23 compiler by maflcko)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36036 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36036.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36036#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [fanquake](https://github.com/bitcoin/bitcoin/pull/36036#issuecomment-6663077089), [hebasto](https://github.com/bitcoin/bitcoin/pull/36036#pullrequestreview-5798026129) | | Concept ACK | [l0rinc](https://github.com/bitcoin/bitcoin/pull/36036#issuecomment-6290136423), [winterrdog](https://github.com/bitcoin/bitcoin/pull/36036#pullrequestreview-5671691622) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--174a7506f384e20aa4161008e828411d--> ### Conflicts Reviewers, this pull request conflicts with the following ones: * [#36042](https://github.com/bitcoin/bitcoin/pull/36042) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36042.svg"></sub> (build: Bump g++ minimum supported version to 13 by maflcko) * [#36033](https://github.com/bitcoin/bitcoin/pull/36033) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36033.svg"></sub> ([wip,nomerge,rfc] build: Require C++23 compiler by maflcko) If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. <!--5faf32d7da4f0f540f40219e4f7537a3-->
maflcko commented 2026-09-17 13:57:05 +00:00 (Migrated from github.com)
This requires an Xcode CLT bump, so please review https://github.com/bitcoin/bitcoin/pull/36287 first
First-time contributor

Earlier concerns remain unresolved; see the full report for their current assessments.

🔵 Suggestion · The macOS cross-build recipe loses its compiler requirement

Removing the version note leaves the unversioned installation command without guidance for hosts whose default Clang is older than the required version 19.

Location: depends/README.md:157 (head).

Review coverage was incomplete.


Reviewed: fa8c3c014d1e · Full review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:4d44b6ffa09c54db24f8f0ab27ae388beae06a733efcae741ca64db76bb1c938:7efd3c3ba41667382004cfa7a7db56605da7d8f9b7ab69bc483f27117390ba48 --> <!-- ralph-base:0fe899d0ede0bd23be27e3af989087a318bceb29 --> <!-- ralph-head:fa8c3c014d1eb17c69a7a286b121134a1c310e54 --> <!-- ralph-case:769f031e4f5af2a6c4234cc57061c53a66e844d9f8e2b51fc05683e5a11f9031 --> Earlier concerns remain unresolved; see the full report for their current assessments. **🔵 Suggestion · The macOS cross-build recipe loses its compiler requirement** Removing the version note leaves the unversioned installation command without guidance for hosts whose default Clang is older than the required version 19. Location: [`depends/README.md:157`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/fa8c3c014d1eb17c69a7a286b121134a1c310e54/depends/README.md#L157>) (head). Review coverage was incomplete. <!-- Review tier: standard --> --- Reviewed: [`fa8c3c014d1e`](<https://git.fish.foo/bitcoin/bitcoin/commit/fa8c3c014d1eb17c69a7a286b121134a1c310e54>) · [Full review report](<https://review.fish.foo/traces/36036-fa8c3c014d1eb17c69a7a286b121134a1c310e54-2251-13.html>) · [Previous reports](<https://review.fish.foo/traces/36036/>) [permalink](<https://review.fish.foo/traces/36036-fa8c3c014d1eb17c69a7a286b121134a1c310e54-2251-13.html>)
DrahtBot commented 2026-10-08 16:19:51 +00:00 (Migrated from github.com)

🐙 This pull request conflicts with the target branch and needs rebase.

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
hebasto (Migrated from github.com) reviewed 2026-10-20 11:25:35 +00:00
hebasto (Migrated from github.com) left a comment

Concept ACK.

Concept ACK.
l0rinc commented 2026-10-20 11:47:23 +00:00 (Migrated from github.com)

Concept ACK, please check if Ralph's objections are valid. Will review properly after it's out of draft - unless you want a detailed review now.

Concept ACK, please check if Ralph's objections are valid. Will review properly after it's out of draft - unless you want a detailed review now.
maflcko commented 2026-10-20 12:02:28 +00:00 (Migrated from github.com)

Haven't looked at Ralph's ci nit, but I think it is just a todo that I haven't yet addressed. This requires https://github.com/bitcoin/bitcoin/pull/36287, so review would be better there first. I've clarified this by dropping the commit from 36287

Haven't looked at Ralph's ci nit, but I think it is just a todo that I haven't yet addressed. This requires https://github.com/bitcoin/bitcoin/pull/36287, so review would be better there first. I've clarified this by dropping the commit from 36287
maflcko (Migrated from github.com) reviewed 2026-10-20 12:07:01 +00:00
maflcko (Migrated from github.com) commented 2026-10-20 12:07:01 +00:00

re Ralph: Was hoping they change the image in September, like last time (https://github.blog/changelog/2024-09-25-actions-new-images-and-ubuntu-latest-changes/), but I guess not anymore

re Ralph: Was hoping they change the image in September, like last time (https://github.blog/changelog/2024-09-25-actions-new-images-and-ubuntu-latest-changes/), but I guess not anymore
maflcko (Migrated from github.com) reviewed 2026-10-22 08:34:27 +00:00
maflcko (Migrated from github.com) commented 2026-10-22 08:34:27 +00:00

fixed in the last commit

fixed in the last commit
fanquake commented 2026-10-22 09:38:07 +00:00 (Migrated from github.com)
Update https://github.com/bitcoin/bitcoin/blob/2034d3078ee1df99cdbfab738b1f2b54c30bd022/src/test/fuzz/vecdeque.cpp#L459 while here?
hebasto (Migrated from github.com) approved these changes 2026-10-22 10:24:23 +00:00
hebasto (Migrated from github.com) left a comment

ACK fae84b611f.

nit: Maybe squash the 1st and 3rd commits?

ACK fae84b611f0b209387e7ab25348bb5594d052432. nit: Maybe squash the 1st and 3rd commits?
maflcko commented 2026-10-22 10:46:51 +00:00 (Migrated from github.com)

nit: Maybe squash the 1st and 3rd commits?

I think it is fine to keep the removals separate from the bump. Force pushed to fix a Ralph nit

> nit: Maybe squash the 1st and 3rd commits? I think it is fine to keep the removals separate from the bump. Force pushed to fix a Ralph nit
hebasto (Migrated from github.com) reviewed 2026-10-22 11:02:54 +00:00
hebasto (Migrated from github.com) left a comment

re-ACK fa70b1cc63.

nit: Maybe squash the 1st and 3rd commits?

I think it is fine to keep the removals separate from the bump.

Not sure I follow which "removals" are referred to here.

re-ACK fa70b1cc63a7762a62bc90e0cdd2950706d456fc. > > nit: Maybe squash the 1st and 3rd commits? > > I think it is fine to keep the removals separate from the bump. Not sure I follow which "removals" are referred to here.
maflcko commented 2026-10-22 11:27:11 +00:00 (Migrated from github.com)

thx, I can't count to 3, squashed now with empty diff

thx, I can't count to 3, squashed now with empty diff
hebasto (Migrated from github.com) approved these changes 2026-10-22 13:32:01 +00:00
hebasto (Migrated from github.com) left a comment

re-ACK faa98fadbc.

re-ACK faa98fadbcd2149ce31c0464a7b5e4a600bac5d2.
maflcko commented 2026-10-27 11:43:41 +00:00 (Migrated from github.com)
cc @winterrdog I see you used Clang 18 in https://github.com/bitcoin/bitcoin/pull/36160#pullrequestreview-5116887377. Would this change be a problem for you?
winterrdog (Migrated from github.com) reviewed 2026-10-27 17:38:17 +00:00
winterrdog (Migrated from github.com) left a comment

concept ACK


re: https://github.com/bitcoin/bitcoin/pull/36036#issuecomment-6441043757

Would this change be a problem for you?

not at all. i can easily switch to clang 20 since i have it installed already

concept ACK --- re: https://github.com/bitcoin/bitcoin/pull/36036#issuecomment-6441043757 > Would this change be a problem for you? not at all. i can easily switch to clang 20 since i have it installed already
hebasto (Migrated from github.com) approved these changes 2026-11-04 23:25:46 +00:00
hebasto (Migrated from github.com) left a comment

re-ACK fac6156944.

The list of platforms in the PR description could also include Windows, where VS ships Clang 22.

re-ACK fac61569443b4bc0e007c5606b8f626405d04758. The list of platforms in the PR description could also include Windows, where VS ships Clang 22.
fanquake commented 2026-11-05 16:18:31 +00:00 (Migrated from github.com)

utACK fa8c3c014d

utACK fa8c3c014d1eb17c69a7a286b121134a1c310e54
hebasto (Migrated from github.com) approved these changes 2026-11-06 09:11:36 +00:00
hebasto (Migrated from github.com) left a comment

re-ACK fa8c3c014d, rebased and removed -Wno-c++23-extensions since my last review.

re-ACK fa8c3c014d1eb17c69a7a286b121134a1c310e54, rebased and removed `-Wno-c++23-extensions` since my last [review](https://github.com/bitcoin/bitcoin/pull/36036#pullrequestreview-5777417373).
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36036
No description provided.