[cfe-dev] -gsplit-dwarf implies -g

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Tue Jun 2 11:10:11 PDT 2020

On Tue, Jun 2, 2020 at 3:13 AM Lubos Lunak <l.lunak at centrum.cz> wrote:
> On Tuesday 02 of June 2020, David Blaikie via cfe-dev wrote:
> > On Wed, May 20, 2020 at 12:28 PM Fangrui Song <maskray at google.com> wrote:
> > > If the build system is structured the way that it will fail when no dwo
> > > is retained... It might be cumbersome.
> >
> > Yep - I suppose it's perhaps more instructive to look at it in the
> > other direction - /adding/ -gsplit-dwarf to a build that doesn't
> > otherwise use it/know about (distcc/etc) would likely break, I imagine
> > (such a system would only know to copy the .o files around the
> > distributed builders, and wouldn't know to bring back the .dwo files
> > to the users machine). Though there's probably other flags that have
> > that property too - so it's not an iron clad argument, to be sure.
>  I don't know specifically about distcc, but Clang's -gsplit-dwarf has been a
> hassle for both icecc and ccache. They both know about -gsplit-dwarf and .dwo
> files, but in the end the simplest solution turned out to be not to rely on
> presence of -gsplit-dwarf and instead remove any stale .dwo and after
> compilation check if .dwo exists (see e.g.
> https://github.com/ccache/ccache/issues/393).

Ah, interesting to know/understand - thanks for the details!

More information about the cfe-dev mailing list