Skip to content

cmake: disable lto when linking gtests#2286

Merged
BareosBot merged 3 commits intobareos:masterfrom
arogge:disable-lto-on-gtests
Jun 3, 2025
Merged

cmake: disable lto when linking gtests#2286
BareosBot merged 3 commits intobareos:masterfrom
arogge:disable-lto-on-gtests

Conversation

@arogge
Copy link
Member

@arogge arogge commented May 27, 2025

this disables link-time-optimization when linking our unittests. This is only possible if we have fat lto objects, so we only do it then. The benefit of this is that we save a lot of compile-time on programs that will only run a few times during testing and then will be discarded.

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
  • Correct milestone is set
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

Looks good to me

@pstorz pstorz added this to the 25.0.0 milestone Jun 3, 2025
arogge and others added 3 commits June 3, 2025 15:26
this disables link-time-optimization when linking our unittests. This is
only possible if we have fat lto objects, so we only do it then.
The benefit of this is that we save a lot of compile-time on programs
that will only run a few times during testing and then will be
discarded.
@BareosBot BareosBot force-pushed the disable-lto-on-gtests branch from d147149 to c4b5f92 Compare June 3, 2025 15:27
@BareosBot BareosBot merged commit 1438ca4 into bareos:master Jun 3, 2025
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