DebugInfo: Add a driver flag for DWARF debug_ranges base address specifier use.
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 13 Nov 2018 20:08:13 +0000 (20:08 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 13 Nov 2018 20:08:13 +0000 (20:08 +0000)
commit27692de9cfa6224f496b982e12ecd3fb86593cc9
tree12088e9014d61240f1ad37a0b5e8642964722310
parentbb279116f29617467a176f065c8ca4e84174e7f7
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
clang/include/clang/Driver/Options.td
clang/include/clang/Frontend/CodeGenOptions.def
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/debug-info-ranges-base-address.c [new file with mode: 0644]
clang/test/Driver/debug-options.c