[PATCH] Allow overriding -split-dwarf-file

Lubos Lunak l.lunak at centrum.cz
Fri May 2 03:49:53 PDT 2014


On Friday 11 of April 2014, Eric Christopher wrote:
> On Fri, Apr 4, 2014 at 9:07 AM, Lubos Lunak <l.lunak at centrum.cz> wrote:
> > On Friday 04 of April 2014, David Blaikie wrote:
> >> Oops, re-add cfe-commits.
> >>
> >> On Fri, Apr 4, 2014 at 8:34 AM, David Blaikie <dblaikie at gmail.com> wrote:
> >> > On Fri, Apr 4, 2014 at 8:24 AM, Lubos Lunak <l.lunak at centrum.cz> wrote:
> >> >> changing DW_AT_GNU_dwo_name explicitly after the build, but that
> >> >> seems needlessly complex given that this seems to be exactly what the
> >> >> option does. I don't see why I would be allowed to override any
> >> >> option except for this one.
> >> >
> >> > -Xclang and the underlying driver arguments aren't really a
> >> > stable/guaranteed interface. I'd be more inclined to accept this
> >> > change if it were just for some debugging, but since it sounds like
> >> > you want to rely on it, it's good for us to understand the goal and
> >> > perhaps suggest or provide the best way of achieving it long-term.
> >
> >  It's stable/guaranteed enough for me, and I'd rather have a clean
> > solution that maybe breaks one day than something hackish the whole time.
>
> I'm guessing you mean that the actual output file name differs? I.e.
> some sort of temporary cached file ala ccache that doesn't have the
> same name as the file that you've just compiled?

 Yes. Something like

 clang -c -g -gsplit-dwarf a.cpp

 may end up actually becoming something along the lines of

 clang -c -x c - -g -gsplit-dwarf -o /tmp/fhqtewdsg.o

> The directory ends up 
> being the same here (or can be set with, as you surmised
> -fdebug-compilation-dir).
>
> If so, I don't mind an option to set here necessarily, but would like
> to see it plumbed through and not rely on Xclang options.

 Like this?

-- 
 Lubos Lunak
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fdebug-compilation-dir-and-fsplit-dwarf-file-also-in.patch
Type: text/x-diff
Size: 8710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140502/63cc6383/attachment.patch>


More information about the cfe-commits mailing list