-
Notifications
You must be signed in to change notification settings - Fork 38.6k
build: Bump clang minimum supported version to 16 #30263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
|
This is needed for stuff:
|
theuni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK.
FWIW on Ubuntu 20.04 I'm using pre-compiled binaries from https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.4 with no issues.
Yeah, seems fine for test systems. I didn't want to suggest it, because https://discourse.llvm.org/t/rfc-improve-binary-security/78121/56 is still WIP. |
|
Should this be dropped: bitcoin/src/test/fuzz/fuzz.cpp Line 75 in 5ee6b76
|
Not sure what is wrong with Apple, but I don't have any insight into their XCode/Apple-Clang versioning and source code, so I think I'll just clarify in this comment that this needs Apple-Clang 16 (the meaning of which is unclear). |
|
Ref: |
|
Looks like the Apple Clang shipping with Xcode 15, is based on Clang 15. Xcode 16 (still in beta) will ship with a Apple Clang based on Clang 16. |
|
Concept ACK fa58c75 I'm on fedora and was able to build properly |
Well, for some reason it can compile ranges fine, without further changes, so at least to some extend it seems to be based on llvm 16 (maybe an intermediate random commit from the In any case, I am not changing the Xcode/macOS/Apple requirements here. Someone else can do it, if there is need for it and it is acceptable to do. |
Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use] |
sedited
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa58c75880334cc58ccc8e5d491df8f0e587bf42
|
Rebased to remove a workaround that was added in the meantime. |
|
Not a blocker at all, I just wonder if there is a verified recipe to get clang-16 for RISC-V platform? |
Not sure what you mean, but this depends on your OS. You can install it normally. For example: But this seems unrelated to this pull, or am I missing something? |
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa8f532, I have reviewed the code and it looks OK.
sedited
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-ACK fa8f532
| { | ||
| const auto it_ins{FuzzTargets().try_emplace(name, FuzzTarget /* temporary can be dropped after clang-16 */ {std::move(target), std::move(opts)})}; | ||
| Assert(it_ins.second); | ||
| const auto [it, ins]{FuzzTargets().try_emplace(name, FuzzTarget /* temporary can be dropped after Apple-Clang-16 ? */ {std::move(target), std::move(opts)})}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that the GHA macos-14 image with Xcode 16.0 (beta) (build 16A5171c) does not require this workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking. I'd say dropping support for macos-13+xcode should be done in a follow-up (probably far into the future).
Or was it meant as a nit to remove the ? in this line of code? If yes, I'll address it, if I have to retouch or rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not mean any changes to the current branch :)
It was just a note (mostly for myself).
|
@instagibbs @sr-gi maybe @mzumsande. This will likely affect you. Any feedback? |
stickies-v
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa8f532
My review shouldn't count for much as I'm not too familiar with build system stuff, but:
- I want clang-16
- it works for me locally
- it doesn't seem to break anything
- the changes look good
|
concept ACK |
I'm really not familiar with the build system, but I was able to build this without any changes in my setup on macOS 14.5 with clang 15.0.0 |
Thanks - no objections, I've updated everywhere, so no longer affected by this. |
|
Ported to the CMake-based build system in hebasto#263. |
4704f86 [FIXUP] ci: Migrate CI scripts to CMake (Hennadii Stepanov) Pull request description: This PR ports CI-related changes from bitcoin#30263 and ensures that the minimum required CMake version is available. Here are CMake versions across all changes: - pre-PR30263: CMake [3.22.1](https://packages.ubuntu.com/jammy/cmake) - post-PR30263: CMake [3.18.4](https://packages.debian.org/bullseye/cmake), which is less than the minimum required 3.22 - this PR: CMake [3.28.3](https://packages.ubuntu.com/noble/cmake) Top commit has no ACKs. Tree-SHA512: 93d88722e0494421c9358b15a86f108c3d70ae4259c370932bfececd90cd5f81dba3e7798adc39da6cb0526a267acfebc8ad9f8506a001c8c18c4776ab1d54e3
, bitcoin#24337, bitcoin#27682, bitcoin#29208, bitcoin#29091, bitcoin#29165, bitcoin#29934, bitcoin#30261, partial bitcoin#27662, bitcoin#28210, bitcoin#28348, bitcoin#30263 (bump minimum compiler) 0861692 partial bitcoin#30263: Bump clang minimum supported version to 16 (Kittywhiskers Van Gogh) 5e7e563 merge bitcoin#30261: add release note for 29091 and 29165 (Kittywhiskers Van Gogh) 4d10993 merge bitcoin#29934: add LLVM instruction for macOS < 13 (Kittywhiskers Van Gogh) 7e4614a merge bitcoin#29165: Bump clang minimum supported version to 15 (Kittywhiskers Van Gogh) f397076 merge bitcoin#29091: Bump g++ minimum supported version to 11 (Kittywhiskers Van Gogh) 35d3357 merge bitcoin#29208: Bump clang minimum supported version to 14 (Kittywhiskers Van Gogh) c71e3df partial bitcoin#28348: Bump g++ minimum supported version to 10 (Kittywhiskers Van Gogh) b7da1ed partial bitcoin#28210: Bump clang minimum supported version to 13 (Kittywhiskers Van Gogh) 6b22832 partial bitcoin#27662: Bump minimum supported GCC to g++-9 (Kittywhiskers Van Gogh) f677769 merge bitcoin#27682: Bump minimum supported Clang to clang-10 (Kittywhiskers Van Gogh) f8e0339 docs: add `libgmp` as an optional dependency (Kittywhiskers Van Gogh) ebba607 docs: update version used to match `depends` (Kittywhiskers Van Gogh) 39b6f4b merge bitcoin#24337: Do not define `PROVIDE_FUZZ_MAIN_FUNCTION` macro unconditionally (Kittywhiskers Van Gogh) 2bd8422 merge bitcoin#23565: rewrite dependencies.md (Kittywhiskers Van Gogh) 56989ec merge bitcoin#24164: Bump minimum required clang/libc++ to 8.0 (Kittywhiskers Van Gogh) bac407f merge bitcoin#23060: increase minimum compiler and lib(std)c++ requirements (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * Dependent on #6516 ## Breaking Changes GCC 11.1 or later, or Clang 16.0 or later, are now required to compile Dash Core. ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK 0861692 UdjinM6: utACK 0861692 Tree-SHA512: 6de3f8153482b4f379fd397dd3000688632356299c4f13a2f8af20d2f7337318bd3cd0b96182d6f378846b14981bc499ea32aa3d20cba6a0c7cf5f2a6e151937
Most supported operating systems ship with clang-16 (or later), so bump the minimum to that and allow new code to drop workarounds for previous clang bugs.
For reference:
clang18); No idea about OpenSuse LeapOn operating systems where the clang version is not shipped by default, the user would have to use GCC, or install clang in a different way. For example:
Ubuntu 22.04 LTS does not ship with clang-16, so one of the above workarounds is needed there.
macOS 13 is unaffected, and the previous minimum requirement of Xcode15.0 remains, see also https://github.com/bitcoin/bitcoin/blame/b1ba1b178f501daa1afdd91f9efec34e5ec1e294/.github/workflows/ci.yml#L93. For macOS 11 (Big Sur) and 12 (Monterey) you need to install a more recent version of llvm, this remains unchanged as well, see https://github.com/bitcoin/bitcoin/blame/b1ba1b178f501daa1afdd91f9efec34e5ec1e294/doc/build-osx.md#L54.