Skip to content

Conversation

@compnerd
Copy link
Member

This adds a new dwarf-fission debug info format for C debug formats. This allows us to build with fission which is cirtical for building the toolchain. We currently exceed the 4GiB limit when building LLDB with DWARF.

This adds a new `dwarf-fission` debug info format for C debug formats.
This allows us to build with fission which is cirtical for building the
toolchain. We currently exceed the 4GiB limit when building LLDB with
DWARF.
@compnerd
Copy link
Member Author

@swift-ci please smoke test

# Debug Information
[switch] $DebugInfo,
[ValidateSet("codeview", "dwarf")]
[ValidateSet("codeview", "dwarf", "dwarf-fission")]
Copy link
Contributor

Choose a reason for hiding this comment

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

We should call it split-dwarf for consistency. That said, is there any reason to not just make this the default and drop the non-split variant? It seems to be impractical anyway...

Copy link
Member Author

@compnerd compnerd Aug 18, 2025

Choose a reason for hiding this comment

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

The default is codeview and we want to keep that I think. The windows tooling prefers codeview (to the point that DWARF basically means that debugging is limited to LLDB, and the QoI there is relatively low). However, if we make dwarf and dwarf-fission synonymous, then I think that we can leave the name as is - once everything is well tested, we can switch dwarf to the dwarf-fission behaviour.

Copy link
Contributor

@Michael137 Michael137 Aug 19, 2025

Choose a reason for hiding this comment

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

Can we just remove DWARF from the get-go? If it's not a useful configuration anyway, it'd be nice to replace it ASAP, rather than live with 3 configurations (which will most likely happen if we don't do it from the start)

Copy link
Member Author

Choose a reason for hiding this comment

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

None of the debug options are particularly helpful ;) they all have different drawbacks. It's better to have a dozen options that you can select between to resolve the issue than to have no debugging at all.

@compnerd compnerd marked this pull request as draft August 19, 2025 15:50
@compnerd
Copy link
Member Author

Fission is not currently usable on Windows. I want to see if it is more useful after an updated snapshot. The current toolchain will simply drop all debug info if you use fission.

DWARF is useless because LLDB prevents the build with DWARF (the generated binary fails to link due to being larger than 4G). Hopefully the DLL-ification of LLVM will help reduce the size to a workable set.

@Michael137
Copy link
Contributor

Fission is not currently usable on Windows. I want to see if it is more useful after an updated snapshot. The current toolchain will simply drop all debug info if you use fission.

DWARF is useless because LLDB prevents the build with DWARF (the generated binary fails to link due to being larger than 4G). Hopefully the DLL-ification of LLVM will help reduce the size to a workable set.

CC @da-viper who is working on enabling split DWARF for the Swift Linux build. Though I think it's still early days, but the issues you encounter might be similar

@compnerd
Copy link
Member Author

Fission is not currently usable on Windows. I want to see if it is more useful after an updated snapshot. The current toolchain will simply drop all debug info if you use fission.
DWARF is useless because LLDB prevents the build with DWARF (the generated binary fails to link due to being larger than 4G). Hopefully the DLL-ification of LLVM will help reduce the size to a workable set.

CC @da-viper who is working on enabling split DWARF for the Swift Linux build. Though I think it's still early days, but the issues you encounter might be similar

I'm not sure if we would encounter the same issues. The container object format is significantly different and DWARF itself is much more problematic as it uses a poor choice of relocations that are section relative (they should use the full addressing mode for intra-section references - that is 64-bit absolute values that need an additional load - and compressed representations). That said, it never hurts to have some of the issues identified - as long as we design the solution properly, it should help.

@compnerd compnerd added Windows Platform: Windows build-script Area → utils: The build script labels Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-script Area → utils: The build script Windows Platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants