#35756 cmake: De-duplicate libraries where possible

ReviewabilityReviewsAgreementSize
#35756 hebasto cmake: De-duplicate libraries where possibleAuthor silent 81d0Crickets13 + 10 tests
  • Silence noisy Apple linker warnings about duplicate libraries
  • Align macOS Guix builds with other platforms by treating linker warnings as fatal errors
  • Ready to review
  • No review verdicts recorded
  • No substantive review comments either way yet
  • Asked clarifying questions and suggested folding in the macOS Guix build change (fanquake)
  • 13 lines added or modified outside tests
  • 10 lines added or modified in tests
  • 2 lines removed in total
  • 3 files, 2 commits
Build and CI#45 of 56
P3 · cleanup
  • P3 because it silences noisy linker warnings without fixing any build failures
  • Improves platform consistency in Guix builds but addresses no release-blocking defects
Reviewability: ReadyStalePaused
Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets
Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs.
Size: lines added or modified outside tests, then in tests; greener = smaller.

Goal

Enables CMake policies CMP0156 and CMP0179 when CMake >= 3.31 is present to de-duplicate libraries on link lines while preserving the first occurrence of static libraries. In addition, updates the macOS Guix build scripts to treat linker warnings as fatal errors.

Problem: Apple's linker issues warnings when duplicate libraries appear on link lines. Additionally, macOS Guix build scripts did not treat linker warnings as fatal errors, unlike builds for other target platforms.

Evidence of importance:

  • Author description states this "silences Apple linker 'ignoring duplicate libraries' warnings"
  • Author description notes the Guix change aligns macOS with other platforms: "The Guix scripts for macOS have been updated to turn linker warnings into errors, as is done for other targets."

Reviewability

Stale · Author silent 81d

No author activity for 81 days; a review may wait a long time for a response.

Waiting on (from the thread read):

  • nothing: nothing pending

Agreement

Crickets

no substantive comment either way

Thread notes: Added sedited with neutral stance for providing Guix build hashes. No new claims or support entries were raised.

Objections, suggestions, and questions: none recorded.

Participants:

  • fanquake (member, question, 2 statements 2026-07-20 to 2026-08-12): asked what changed since #31504 and why the Darwin Guix warnings-as-errors change was not included directly
  • sedited (member, neutral, 1 statements 2026-09-25 to 2026-09-25): posted Guix build hashes

Files

12 lines under test/bench/ci.

  • CMakeLists.txt +13/-0
  • contrib/guix/libexec/build_macos.sh +5/-1
  • contrib/guix/libexec/build_macos_gui.sh +5/-1

Card

The short text the ranking pass compares across PRs.

Enables CMake policies CMP0156 and CMP0179 on CMake >= 3.31 to de-duplicate libraries on link lines, and configures macOS Guix builds to treat linker warnings as fatal errors with -Wl,-fatal_warnings. This silences Apple linker warnings regarding duplicate libraries and brings macOS Guix builds in line with other target platforms that already fail on linker warnings. For environments using CMake versions older than 3.31, the policy guard makes the change a no-op.

Data

dossier JSON · extract JSON · model ledger, generated 2026-09-26T01:19, confidence high, input hash d33409d8dd534baa
thread read through 2026-09-25 (6 statements), head e6c1483832
Discussion read under schema 1 rules: suggestions and questions may be missing, and an objection may combine several harms (schema history).
labels: Build system

Categories

Build and CI

P3 · cleanup

Silences Apple linker warnings about duplicate libraries and aligns macOS Guix builds with other targets by treating linker warnings as fatal errors. The change removes noisy build output and improves build consistency across platforms, but addresses no build failures or release-blocking defects.

Membership: Touches CMakeLists.txt and contrib/guix build scripts with the 'Build system' label.

Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 1