[PATCH] D90507: Adding DWARF64 clang flag: -gdwarf64
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 16:40:31 PST 2020
ayermolo added inline comments.
================
Comment at: clang/include/clang/Driver/Options.td:2145-2146
HelpText<"Generate source-level debug information with dwarf version 5">;
+def gdwarf64 : Flag<["-"], "gdwarf64">, Group<g_Group>, Flags<[CC1Option]>,
+ HelpText<"Generate DWARF64 debug information.">;
----------------
dblaikie wrote:
> Does this actually enable debug info emission (the -gdwarf-N versions do cause debug info to be emitted, and set the dwarf version - but, say -ggnu-pubnames does not cause debug info to be emitted if it isn't otherwise requested). Experience has shown it's probably better to have flags like this not enable debug info emission - so they can be used orthogonally (eg: if a project is large, it can add -gdwarf64 to its flags permanently, even though maybe only some build modes, etc, enable debug info (with -g))
>
> If this doesn't enable debug info emission, the phrasing of the help text might be worth changing somewhat (I wonder how we document -ggnu-pubnames, for instance/comparison/inspiration)
This enables DWARF64 if emission is enabled.
>From DebugInfo it seems like it's only Elf Format:
bool Dwarf64 = Asm->TM.Options.MCOptions.Dwarf64 &&
DwarfVersion >= 3 && // DWARF64 was introduced in DWARFv3.
TT.isArch64Bit() && // DWARF64 requires 64-bit relocations.
TT.isOSBinFormatELF(); // Support only ELF for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90507/new/
https://reviews.llvm.org/D90507
More information about the llvm-commits
mailing list