ci: add CMAKE_LINK_WARNING_AS_ERROR to macOS jobs #36936

Manually merged
fanquake merged 1 commit from ci_linker_warn into master 2026-11-24 18:00:58 +00:00 AGit
fanquake commented 2026-11-21 09:29:49 +00:00 (Migrated from github.com)

Turn linker warnings into errors, so that any future warnings are caught.

Turn linker warnings into errors, so that any future warnings are caught.
DrahtBot commented 2026-11-21 09:29:57 +00:00 (Migrated from github.com)

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.

Type Reviewers
ACK hebasto

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36936 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36936.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36936#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [hebasto](https://github.com/bitcoin/bitcoin/pull/36936#pullrequestreview-6044629097) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

No findings were published from this review.

Review coverage was incomplete.


Reviewed: c1cdf8dd5bd1 · Review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:bf798f720ef764c6d822a1885aa53fec433b7e12a3cb60b208eb5b4636279ec7:3329223fb40bbbe44124b0523f0fa08f23650d06836368f60e45a38d2db02971 --> <!-- ralph-base:dbe9eacd17ae1cc24581081613123a40b44a9f31 --> <!-- ralph-head:c1cdf8dd5bd18ead7ffe3c2e02e193bae72a3f85 --> <!-- ralph-case:88fa56b4feff0c42391dad54d126c01d2bc4a96413ee4a526eb4f8a0226b3fee --> No findings were published from this review. Review coverage was incomplete. <!-- Review tier: standard --> --- Reviewed: [`c1cdf8dd5bd1`](<https://git.fish.foo/bitcoin/bitcoin/commit/c1cdf8dd5bd18ead7ffe3c2e02e193bae72a3f85>) · [Review report](<https://review.fish.foo/report/36936-c1cdf8dd5bd18ead7ffe3c2e02e193bae72a3f85-3040-3.html>) · [Previous reports](<https://review.fish.foo/traces/36936/>) [permalink](<https://review.fish.foo/report/36936-c1cdf8dd5bd18ead7ffe3c2e02e193bae72a3f85-3040-3.html>)
hebasto (Migrated from github.com) reviewed 2026-11-24 13:05:05 +00:00
hebasto (Migrated from github.com) left a comment

The CMake version in Debian Trixie, where the "macOS-cross *" jobs run, does not support CMAKE_LINK_WARNING_AS_ERROR yet:

-- Configuring done (8.3s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_LINK_WARNING_AS_ERROR


-- Generating done (0.1s)
-- Build files have been written to: /home/runner/work/_temp/build_ ₿🧪_

I believe you want to modify the "macOS native*" jobs instead, where the linker did emit warnings before bitcoin/bitcoin#35756 was merged.

The CMake version in Debian Trixie, where the "macOS-cross *" jobs run, does not support `CMAKE_LINK_WARNING_AS_ERROR` yet: ``` -- Configuring done (8.3s) CMake Warning: Manually-specified variables were not used by the project: CMAKE_LINK_WARNING_AS_ERROR -- Generating done (0.1s) -- Build files have been written to: /home/runner/work/_temp/build_ ₿🧪_ ``` I believe you want to modify the "macOS native*" jobs instead, where the linker did emit warnings before bitcoin/bitcoin#35756 was merged.
hebasto (Migrated from github.com) commented 2026-11-24 13:04:34 +00:00

I'm fine with the boolean value ON. However, reviewers might be interested to know that it is equivalent to LINKER;DRIVER.

I'm fine with the boolean value `ON`. However, reviewers might be interested to know that it is [equivalent](https://cmake.org/cmake/help/latest/prop_tgt/LINK_WARNING_AS_ERROR.html) to `LINKER;DRIVER`.
fanquake commented 2026-11-24 14:02:17 +00:00 (Migrated from github.com)

does not support CMAKE_LINK_WARNING_AS_ERROR yet:

Right, and it wouldn't work anyways, given CMake is broken in the macOS cross case. This was meant for the native jobs.

> does not support CMAKE_LINK_WARNING_AS_ERROR yet: Right, and it wouldn't work anyways, given [CMake is broken in the macOS cross case](https://gitlab.kitware.com/cmake/cmake/-/work_items/28316). This was meant for the native jobs.
hebasto (Migrated from github.com) approved these changes 2026-11-24 17:59:26 +00:00
hebasto (Migrated from github.com) left a comment

ACK c1cdf8dd5b.

ACK c1cdf8dd5bd18ead7ffe3c2e02e193bae72a3f85.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36936
No description provided.