mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 12:20:38 +00:00
bench: fix InputType ODR violation #36966
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36966
Loading…
Reference in a new issue
No description provided.
Delete branch "bench_odr_anon_namespace"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Introduced in #36475:
There's a commit here that adds a CI config, using GCC and LTO, which uses
-Wodr. The existing LTO config uses Clang, and I'm not sure about adding LTO to any existing job. However I do think we should be catching ODR violations in CI.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.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.No findings were published from this review.
Review coverage was incomplete.
Reviewed:
66654bc5ce9b· Review report · Previous reportspermalink
Could add to the
ci/test/00_setup_env_native_alpine_musl.sh, which already uses gcc and more likely will be using a more recent gcc than some Ubuntu LTS?Looks like they are currently using the same version (
15.2.0). I can push that up to compare runtime to master.20 minutes uncached seems reasonable. Have dropped the other config, if we're happy adding this to Alpine.
lgtm. Tested:
maybe in a new commit: Should this be enabled globally in CI like:
review ACK
66654bc5ce🐨Show signature
Signature:
Yea. We could add
-DCMAKE_LINK_WARNING_AS_ERROR=ONto jobs with CMake 4.0+, just need to avoid the macOS cross jobs due to upstream bugs: https://github.com/bitcoin/bitcoin/pull/35756#issuecomment-7104061664.Ok, I see. Let's wait for the upstream bug to be fixed first and then just add
-DCMAKE_LINK_WARNING_AS_ERROR=ONglobally? IIUC older cmake will just ignore it, which should be fine to avoid the verbosity here of having to place it in every ci task one-by-one?ACK
66654bc5ce, tested on Fedora 45.nit: The
INTERPROCEDURAL_OPTIMIZATIONtarget property, whichCMAKE_INTERPROCEDURAL_OPTIMIZATIONinitializes, is a CMake abstraction that is designed to be used along with theCheckIPOSupportedmodule. Now that we are about to start usingCMAKE_INTERPROCEDURAL_OPTIMIZATIONin the regular CI builds, I believe we should add that check to the build system.Note:
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ONis already used inci/test/00_setup_env_native_chimera_lto.sh, but that config is not part of the regular CI builds.Can you elaborate? Not sure I'm following in why we need to add more custom checks/machinery to our build system, to just use normal CMake config options? (also not sure why CI use makes a difference here, because the option can be used, and is already being used, by anyone, outside the CI?)
From https://cmake.org/cmake/help/latest/policy/CMP0069.html:
Ok. Seems like the build will error in any case, if someone passes
CMAKE_INTERPROCEDURAL_OPTIMIZATIONand their compiler doesn't support it, but adding a call toCheckIPOSupportedwould also cause an error for anyone not using LTO, if their compiler didn't support it (which even if unlikely, I'm not sure we want). Can be discussed in a new PR if needed.