Skip to content

build: move hardening flags to dedicated cmake module#254

Open
kwsantiago wants to merge 1 commit intobitcoinknots:29.x-knotsfrom
privkeyio:cmake-hardening-module
Open

build: move hardening flags to dedicated cmake module#254
kwsantiago wants to merge 1 commit intobitcoinknots:29.x-knotsfrom
privkeyio:cmake-hardening-module

Conversation

@kwsantiago
Copy link
Copy Markdown

Comment thread cmake/module/Hardening.cmake
@kwsantiago kwsantiago force-pushed the cmake-hardening-module branch 2 times, most recently from a6cead3 to c9765f0 Compare February 16, 2026 22:50
@kwsantiago kwsantiago requested a review from luke-jr February 17, 2026 17:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the CMake hardening flag setup out of the top-level CMakeLists.txt into a dedicated cmake/module/Hardening.cmake module to centralize and reuse the hardening configuration.

Changes:

  • Add cmake/module/Hardening.cmake providing setup_hardening(target).
  • Include the new Hardening module from the top-level CMakeLists.txt.
  • Replace the inlined hardening flag setup in CMakeLists.txt with a single setup_hardening(core_interface) call.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
cmake/module/Hardening.cmake New module encapsulating hardening-related compile/link flag logic behind setup_hardening().
CMakeLists.txt Switches from inlined hardening logic to using the new module helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmake/module/Hardening.cmake
Comment thread cmake/module/Hardening.cmake
Comment thread cmake/module/Hardening.cmake Outdated
@kwsantiago kwsantiago force-pushed the cmake-hardening-module branch 4 times, most recently from 91ad97b to 18308c0 Compare April 2, 2026 00:14
@kwsantiago kwsantiago force-pushed the cmake-hardening-module branch from 18308c0 to 5c77cb5 Compare April 2, 2026 01:35
@luke-jr luke-jr added this to the 29.3 (2nd) milestone Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants