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

Lubos Lunak via cfe-dev cfe-dev at lists.llvm.org
Tue Jun 2 03:13:20 PDT 2020


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).

-- 
 Lubos Lunak


More information about the cfe-dev mailing list