[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 22 14:18:28 PDT 2018


The only data we have is that where .o files go, .dwo files go beside them.
How to generalize this to other situations isn't really obvious to me -
even for a.out (do you put all the .dwo files next to a.out? in the same
directory? if the names collide, where then? etc).

Interestingly GCC for "g++ foo.cpp" puts the foo.dwo file right where it
would go by default (next to foo.cpp, even though there's no foo.o).  Oh,
LLVM does that too. Huh. I'm not sure that's a terribly helpful default to
extrapolate to ThinLTO for, though.



On Thu, Mar 22, 2018 at 1:57 PM Paul Robinson via Phabricator <
reviews at reviews.llvm.org> wrote:

> probinson added a comment.
>
> In https://reviews.llvm.org/D44788#1046093, @dblaikie wrote:
>
> > In implicit ThinLTO, the object files are only temporary.
> >
> > Sort of similar to using -gsplit-dwarf when compiling straight to an
> >  executable (without using -c): "clang++ x.cpp y.cpp -o a.out" - where
> >  should the .dwo files go then? If they go where the .o files go, then
> >  they'll be in /tmp/ and get deleted either when the ocmpiler ends after
> it
> >  runs the linker, or perhaps at some uncertain point in the future when
> the
> >  temp space is reclaimed.
>
>
> I think that the .dwo files generally go where the user-specified final
> output goes.  So in your example they would go where a.out goes, not where
> the intermediate/temporary .o files go.
> Being able to override that is fine, but being required to specify a
> directory in order to get fission in the first place is not.
>
>
> Repository:
>   rC Clang
>
> https://reviews.llvm.org/D44788
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180322/4cfa4a77/attachment.html>


More information about the cfe-commits mailing list