[PATCH] D80391: [Driver] Don't make -gsplit-dwarf imply -g2

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 7 12:41:06 PST 2020


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Looks like GCC has changed the semantics here despite the backwards compatibility break - as much as I'd rather not break backwards compatibility it's probably best on balance to maintain GCC compatibility instead: https://godbolt.org/z/zGanxE

Could you either provide in this patch or a follow-up, a -gno-split-dwarf flag? (probabyl better in a follow-up)

Could you check that this is compatible with the cmake split DWARF support in the LLVM build system, and with Google's internal use, before committing? (not sure there are any other users of this feature we can effectively update - or that I specifically know of)



================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3718
+  } else
+    DwarfFission = DwarfFissionKind::None;
 
----------------
Rather than undoing the DwarfFission uinitialization, instead could the DwarfFission initialization be rolled into the "if (gN_Group)" condition?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80391



More information about the cfe-commits mailing list