Skip to content

fix(cmake): reduce noise in debug build linker flags on Linux #21006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jarred-Sumner
Copy link
Collaborator

What does this PR do?

Move Linux optimization-focused linker flags to release builds only:

  • --icf=safe: identical code folding for size optimization
  • -O2: enable string tail merging optimization
  • -z,combreloc: combine relocations for faster loading

Keep debugging-related flags in all builds:

  • --compress-debug-sections=zlib: compress debug sections for smaller files
  • --gdb-index: faster debug symbol loading in GDB

This reduces verbose linker output and link times in debug builds while preserving essential debugging functionality.

🤖 Generated with Claude Code

How did you verify your code works?

Move optimization-focused linker flags to release builds only:
- --icf=safe: identical code folding for size optimization
- -O2: enable string tail merging optimization
- -z,combreloc: combine relocations for faster loading

Keep debugging-related flags in all builds:
- --compress-debug-sections=zlib: compress debug sections for smaller files
- --gdb-index: faster debug symbol loading in GDB

This reduces verbose linker output and link times in debug builds
while preserving essential debugging functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@robobun
Copy link
Collaborator

robobun commented Jul 13, 2025

Updated 12:47 AM PT - Jul 13th, 2025

Your commit eb2113b is building: #20316

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.

2 participants