[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

Eric Christopher via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 30 17:30:46 PDT 2018


echristo added a comment.

In https://reviews.llvm.org/D52296#1246142, @grimar wrote:

> In https://reviews.llvm.org/D52296#1243688, @echristo wrote:
>
> > In https://reviews.llvm.org/D52296#1241928, @probinson wrote:
> >
> > > Do we generate the .dwo file directly these days?  If not, I can imagine wanting to avoid the overhead of the objcopy hack; as long as the linker is smart enough not to bother with the .debug_*.dwo sections this seems like a build-time win.
> >
> >
> > We do generate them generically with no objcopy hack.
>
>
> Eric, could you elaborate for me your position, please


We don't use objcopy on linux or fuschia to generate .dwo files.

> 
> 
>> As far as the standard text here, IMO it was just there in case people didn't have an objcopy around or don't want to split it.
> 
> Yeah, we do not want to split it and I see no other way to say clang to keep them in a .o files rather than introducing the new flag.
>  Am I missing something?
> 
>> I'm not sure why we would want the ability. 
>>  That said, if we do I'd rather have it as dwarf5 without split-dwarf as an option rather than a -gsingle-file-split-dwarf option.
> 
> What do you mean as "dwarf5 without split-dwarf as an option" here? Do you mean to do split-dwarf by default? It is orthogonal to what this patch does.

So, what are you trying to do here is, I guess, my other question.

Are you trying to take advantage of dwarf5 features, or are you just trying to have everything in one file for later splitting? Or something else? If you want to generate split dwarf (as opposed to a lot of dwarf5 features some of which are split dwarf) I'll bike shed that we need to come up with a better set of option naming here - I'd probably repurpose/alias -gsplit-dwarf and use -f options for whether or not to use specific features etc.

Can you elaborate on your motivations and what you're trying to do?

Thanks!


https://reviews.llvm.org/D52296





More information about the cfe-commits mailing list