[PATCH] D94647: [Driver] -gsplit-dwarf: Produce .dwo regardless of -gN for -fthinlto-index=
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 13 23:03:14 PST 2021
MaskRay added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3758
+ // Normally -gsplit-dwarf is only useful with -gN. For -gsplit-dwarf in the
+ // backend phase of a distributed ThinLTO which does object file generation
+ // and no IR generation, -gN should not be needed. So allow -gsplit-dwarf with
----------------
dblaikie wrote:
> tejohnson wrote:
> > Better to simply check if the input type is IR/BC via types::isLLVMIR(Input.getType()). Technically you don't need ThinLTO to do a clang compile with bitcode input. Looks like Input can be passed down from the caller.
> Good point! +1 to that.
That currently does not work:
`clang -g -c -flto a.c; fclang -gsplit-dwarf -g a.o -o a`
there is no .dwo
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94647/new/
https://reviews.llvm.org/D94647
More information about the cfe-commits
mailing list