build: Link `libbitcoinkernel` to `libbitcoin_util` #27285

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:230320-util changing 2 files +10 −35
  1. hebasto commented at 3:55 PM on March 20, 2023: member

    This PR makes libbitcoinkernel reuse object files from libbitcoin_util instead of compiling them.

    Also see doc/design/libraries.md

  2. DrahtBot commented at 3:55 PM on March 20, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept NACK fanquake, TheCharlatan

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Build system on Mar 20, 2023
  4. fanquake commented at 3:58 PM on March 20, 2023: member

    This PR makes libbitcoinkernel reuse object files from libbitcoin_util instead of compiling them.

    Why

  5. hebasto commented at 4:11 PM on March 20, 2023: member

    This PR makes libbitcoinkernel reuse object files from libbitcoin_util instead of compiling them.

    Why

    Isn't libbitcoin_util supposed to be a reusable build artifact?

    And in master branch libbitcoinkernel_la_SOURCES and libbitcoin_util_a_SOURCES have almost the same source file lists.

  6. build: Make `libbitcoin_util` a Libtool library dd23ee3d62
  7. build: Link `libbitcoinkernel` to `libbitcoin_util` cd04fc544d
  8. hebasto force-pushed on Mar 20, 2023
  9. fanquake commented at 4:54 PM on March 20, 2023: member

    NACK. This is pretty literally the opposite of what we want to be doing with the kernel.

    And in master branch libbitcoinkernel_la_SOURCES and libbitcoin_util_a_SOURCES have almost the same source file lists.

    The whole point of having these files enumerated, is so that we know what is currently in the kernel, and can continue to (easily) prune deps, while refactoring. Hiding this away into libbitcoin_util only makes this harder/impossible to do, and you're just removing the current, explicit listing, of what makes up the kernel.

  10. TheCharlatan commented at 5:05 PM on March 20, 2023: contributor

    Concept NACK

    Isn't libbitcoin_util supposed to be a reusable build artifact?

    Maybe, but linking in the entirety of the util library is not what the kernel project is currently trying to achieve. The goal is to prune as many files as possible out of the library. This also stated in stage 1 step 2 of the original kernel issue: #24303 . Once stage 2 is reached, there may be a discussion again of a shared build artifact containing the intersection of files between the kernel and another library. Since there is no telling yet what this might look like, I don't think it's productive to discuss now or in the nearer future.

  11. hebasto closed this on Mar 20, 2023

  12. theuni commented at 8:11 PM on March 21, 2023: member

    Agree with the NACKs here. It would be nice if we could share the objs to reduce compilation time, but there are good reasons to keep things separate.

    But to add another practical problem, eventually libbitcoinkernel will need to be built with a -DLIBBITCOINKERNEL_SHARED or so once it gains an API. That would mean that objects are no-longer identical to (or shareable with) our internal libs.

  13. bitcoin locked this on Mar 20, 2024

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: 2026-04-24 21:13 UTC

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