diff options
| author | David Blaikie <dblaikie@gmail.com> | 2018-11-13 20:08:13 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2018-11-13 20:08:13 +0000 |
| commit | 27692de9cfa6224f496b982e12ecd3fb86593cc9 (patch) | |
| tree | 12088e9014d61240f1ad37a0b5e8642964722310 /clang/include | |
| parent | bb279116f29617467a176f065c8ca4e84174e7f7 (diff) | |
| download | bcm5719-llvm-27692de9cfa6224f496b982e12ecd3fb86593cc9.tar.gz bcm5719-llvm-27692de9cfa6224f496b982e12ecd3fb86593cc9.zip | |
DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use.
Summary:
This saves a lot of relocations in optimized object files (at the cost
of some cost/increase in linked executable bytes), but gold's 32 bit
gdb-index support has a bug (
https://sourceware.org/bugzilla/show_bug.cgi?id=21894 ) so we can't
switch to this unconditionally. (& even if it weren't for that bug, one
might argue that some users would want to optimize in one direction or
the other - prioritizing object size or linked executable size)
Differential Revision: https://reviews.llvm.org/D54243
llvm-svn: 346789
Diffstat (limited to 'clang/include')
| -rw-r--r-- | clang/include/clang/Driver/Options.td | 4 | ||||
| -rw-r--r-- | clang/include/clang/Frontend/CodeGenOptions.def | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index cc9f21e2ad8..2463d7bb8d8 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -1780,6 +1780,10 @@ def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Place debug types in their own section (ELF Only)">; def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>, Flags<[CC1Option]>; +def fdebug_ranges_base_address: Flag <["-"], "fdebug-ranges-base-address">, Group<f_Group>, + Flags<[CC1Option]>, HelpText<"Use DWARF base address selection entries in debug_ranges">; +def fno_debug_ranges_base_address: Flag <["-"], "fno-debug-ranges-base-address">, Group<f_Group>, + Flags<[CC1Option]>; def fsplit_dwarf_inlining: Flag <["-"], "fsplit-dwarf-inlining">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF">; def fno_split_dwarf_inlining: Flag<["-"], "fno-split-dwarf-inlining">, Group<f_Group>, diff --git a/clang/include/clang/Frontend/CodeGenOptions.def b/clang/include/clang/Frontend/CodeGenOptions.def index 3687c590767..510dd1c31c7 100644 --- a/clang/include/clang/Frontend/CodeGenOptions.def +++ b/clang/include/clang/Frontend/CodeGenOptions.def @@ -331,6 +331,9 @@ CODEGENOPT(PreserveVec3Type, 1, 0) /// Whether to emit .debug_gnu_pubnames section instead of .debug_pubnames. CODEGENOPT(DebugNameTable, 2, 0) +/// Whether to use DWARF base address specifiers in .debug_ranges. +CODEGENOPT(DebugRangesBaseAddress, 1, 0) + CODEGENOPT(NoPLT, 1, 0) /// Whether to embed source in DWARF debug line section. |

