[PATCH] D136309: [clang][Toolchains][Gnu] pass -g through to assembler

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 10:25:50 PDT 2022


MaskRay added a comment.

Many -g options unfortunately enable/disable debug info emission: -g, -g[0123], -ggdb[0123], etc. The full rules are very complex. I think it makes sense to support a subset which is mostly likely used, i.e. -g, -g[0123]. So you may check `OPT_g_Group` and possibly reuse `DebugLevelToInfoKind` (if you want to support -ggdb0) or just hard code OPT_g0 if you just want to support -g0.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136309



More information about the cfe-commits mailing list