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

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 13 13:12:45 PST 2021


MaskRay added inline comments.


================
Comment at: clang/docs/ReleaseNotes.rst:120
   `nonnull` attribute on `this` for configurations that need it to be nullable.
+- ``-gsplit-dwarf`` no longer implies ``-g2``.
 
----------------
dblaikie wrote:
> thakis wrote:
> > This apparently bit us (chromium) in thinlto configs. Could this here be more explicit that `-gsplit-dwarf` now needs an explicit `-g2` in cflags, and if using thinlto, in ldflags as well?
> Arguably I think maybe it should be fixed/made to work for (thin)lto with -g2 in cflags and -gsplit-dwarf in ldflags, without the need to specify -g2 in ldflags (if that's what you're saying is currently required). Since the -gN level would hopefully at best be ignored (because the IR carries the N in -gN with it, and it'd be unfortunate it enabling split dwarf meant you had to ignore all your per-file -gN levels, or that the -gN is ignored except for allowing -gsplit-dwarf to be respected).
> 
> @MaskRay ?
LLD LTO does not have debug related options. `ld -g` is an ignored compatibility option. LLD somewhat inherited that from GNU ld. I don't think `-gsplit-dwarf` or `-g` can be separately controlled in ldflags.

@thakis Can you share the crbug.com discussion thread?


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