-
Notifications
You must be signed in to change notification settings - Fork 10.6k
build.ps1: introduce new debug format "dwarf-fission" #83798
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
base: main
Are you sure you want to change the base?
Conversation
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.
|
@swift-ci please smoke test |
| # Debug Information | ||
| [switch] $DebugInfo, | ||
| [ValidateSet("codeview", "dwarf")] | ||
| [ValidateSet("codeview", "dwarf", "dwarf-fission")] |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
|
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. |
This adds a new
dwarf-fissiondebug 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.