dblaikie added a comment.

In D80391#2497018 <https://reviews.llvm.org/D80391#2497018>, @inglorion wrote:

> For Chrome on Chrome OS, this is https://crbug.com/1158215
>
> Here, we saw our links fail with "output file too large". Investigation 
> revealed that debug info was being included in the binary, instead of in .dwo 
> files as expected. That turned out to be caused by this change.
>
> It seems that there are cases where -gsplit-dwarf is passed, but it does not 
> take effect because there isn't also a -g (or -g<level>) option:
>
>   clang -c -fthinlto-index=foo.o.thinlto.bc -gsplit-dwarf foo.o -o foo.bin.o
>
> Shows no .dwo file and debug info in foo.bin.o, whereas
>
>   clang -c -fthinlto-index=foo.o.thinlto.bc -gsplit-dwarf -g foo.o -o 
> foo.bin.o
>
> shows a .dwo file which is referenced from foo.bin.o
>
> The only thing that is different here is that the latter command has "-g" 
> whereas the former doesn't.
>
> In other words, the new implementation still doesn't make -g and 
> -gsplit-dwarf fully orthogonal; instead of -gsplit-dwarf always turning on 
> debug fission, it *only* turns it on when there is also a -g or -g<level> 
> option - at least in distributed ThinLTO code generation.
>
> It seems that orthogonality was the motivation for this change, and that 
> -gsplit-dwarf without -g is supposed to work in the linker (per MaskRay's 
> comment about -g being ignored by the linker).
>
> Can we make it so that -gsplit-dwarf turns on debug fission and we then use 
> that even if no -g options were passed?

Ah, sorry - I assumed you were using implicit thinlto rather than explicit 
thinlto.

Yes, I think you've demonstrated a bug here - hopefully @Maskray can look 
into/fix this so that only -gN is required when the IR is generated and only 
-gsplit-dwarf is required when real object files are generated - without 
needing both files even when only one of those operations (IR generation or 
object generation) is being performed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80391/new/

https://reviews.llvm.org/D80391

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to