Skip to content

Comments

[Infrastructure] Use -gsplit-dwarf to improve linking#14145

Open
ktf wants to merge 2 commits intoAliceO2Group:masterfrom
ktf:split-dwarf
Open

[Infrastructure] Use -gsplit-dwarf to improve linking#14145
ktf wants to merge 2 commits intoAliceO2Group:masterfrom
ktf:split-dwarf

Conversation

@ktf
Copy link
Member

@ktf ktf commented Dec 9, 2025

No description provided.

@ktf ktf requested review from a team, alibuild, ddobrigk, iarsene and jgrosseo as code owners December 9, 2025 14:25
@github-actions
Copy link

github-actions bot commented Dec 9, 2025

O2 linter results: ❌ 0 errors, ⚠️ 0 warnings, 🔕 0 disabled

@github-actions github-actions bot changed the title Use -gsplit-dwarf=single to improve linking [Infrastructure] Use -gsplit-dwarf=single to improve linking Dec 9, 2025
@ktf
Copy link
Member Author

ktf commented Dec 9, 2025

In my minimal test seems to speed up building by 15%.

@alibuild
Copy link
Collaborator

alibuild commented Dec 9, 2025

Error while checking build/O2Physics/o2 for 7147fe1 at 2026-02-17 12:53:

## sw/BUILD/O2Physics-latest/log
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
c++: error: unrecognized debug output level 'split-dwarf=single'
ninja: build stopped: subcommand failed.

Full log here.

@vkucera
Copy link
Collaborator

vkucera commented Feb 19, 2026

@ktf The option -gsplit-dwarf does not seem to take any arguments.

@ktf ktf requested a review from dsekihat as a code owner February 19, 2026 07:49
@ktf
Copy link
Member Author

ktf commented Feb 19, 2026

Indeed... It's only supported by Clang... :-/ We can have the version without the option, however it will mean that we have to do some extra juggling to get the debug symbols working.

@vkucera
Copy link
Collaborator

vkucera commented Feb 19, 2026

Indeed... It's only supported by Clang... :-/ We can have the version without the option, however it will mean that we have to do some extra juggling to get the debug symbols working.

Isn't it enough to just use the Clang version for macOS and the GCC version for Linux?

@ktf
Copy link
Member Author

ktf commented Feb 19, 2026

This is only for linux (Clang and Linux), on macOS the debug symbols are handled in a different way (via .dSYM) and this does not really apply.

The GCC version will need some extra juggling in any case to allow the debugger to find the debug symbols. The nice thing of =single, AFAICT, is that there is still only one file (hence the name). Still, the debug information is completely separate with such an option from the elf layout point of view and the linker does way less heavy lifting to merge multiple objects.

@vkucera vkucera changed the title [Infrastructure] Use -gsplit-dwarf=single to improve linking [Infrastructure] Use -gsplit-dwarf to improve linking Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants