cmake: De-duplicate libraries on link lines opportunistically #31504

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:241215-duplicate changing 2 files +12 −0
  1. hebasto commented at 3:59 pm on December 15, 2024: member

    This PR resolves “ignoring duplicate libraries” linker warnings on macOS:

    0[892/895] Linking CXX executable src/test/test_bitcoin
    1ld: warning: ignoring duplicate libraries: 'src/secp256k1/lib/libsecp256k1.a'
    2<snip>
    3[894/895] Linking CXX executable src/test/fuzz/fuzz
    4ld: warning: ignoring duplicate libraries: 'libleveldb.a', 'libminisketch.a', 'src/libbitcoin_common.a', 'src/secp256k1/lib/libsecp256k1.a', 'src/univalue/libunivalue.a', 'src/util/libbitcoin_util.a'
    
  2. cmake: De-duplicate libraries on link lines opportunistically
    This change resolves "ignoring duplicate libraries" linker warnings on
    macOS.
    710a0bb52f
  3. hebasto added the label Build system on Dec 15, 2024
  4. hebasto added the label Tests on Dec 15, 2024
  5. DrahtBot commented at 3:59 pm on December 15, 2024: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31504.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #30901 (cmake: Revamp handling of data files for {test,bench}_bitcoin targets by hebasto)

    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.

  6. theuni commented at 7:12 pm on December 16, 2024: member
    I saw this new feature recently as well and had the opposite thought.. I’m not sure how much I trust CMake’s linker feature logic as it seems to be based on the target as opposed to the linker itself. I have a slight preference for setting this to the old policy just so that we’re always in control. As long as dupe libs are just warnings, I don’t see any harm.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me