summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-10 02:08:21 +0000
committerFangrui Song <maskray@google.com>2019-05-10 02:08:21 +0000
commitbdb21337e6e1732c9895966449c33c408336d295 (patch)
tree531fcfb6a81caacbce95a57ac4946807ae541685 /clang/tools
parentea38ac5ba3148e72dc1a260910ef65d2f623e0b5 (diff)
downloadbcm5719-llvm-bdb21337e6e1732c9895966449c33c408336d295.tar.gz
bcm5719-llvm-bdb21337e6e1732c9895966449c33c408336d295.zip
Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED)
Since July 15, 2015 (binutils-gdb commit 19a7fe52ae3d0971e67a134bcb1648899e21ae1c, included in 2.26), gas --compress-debug-sections=zlib (gcc -gz) means zlib-gabi: SHF_COMPRESSED. Before that it meant zlib-gnu (.zdebug). clang's -gz was introduced in rC306115 (Jun 2017) to indicate zlib-gnu. It is 2019 now and it is not unreasonable to assume users of the new feature to have new linkers (ld.bfd/gold >= 2.26, lld >= rLLD273661). Change clang's default accordingly to improve standard conformance. zlib-gnu becomes out of fashion and gets poorer toolchain support. Its mangled names confuse tools and are more likely to cause problems. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D61689 llvm-svn: 360403
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/driver/cc1as_main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/tools/driver/cc1as_main.cpp b/clang/tools/driver/cc1as_main.cpp
index c0334609be5..f9c25399b37 100644
--- a/clang/tools/driver/cc1as_main.cpp
+++ b/clang/tools/driver/cc1as_main.cpp
@@ -221,8 +221,7 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
if (const Arg *A = Args.getLastArg(OPT_compress_debug_sections,
OPT_compress_debug_sections_EQ)) {
if (A->getOption().getID() == OPT_compress_debug_sections) {
- // TODO: be more clever about the compression type auto-detection
- Opts.CompressDebugSections = llvm::DebugCompressionType::GNU;
+ Opts.CompressDebugSections = llvm::DebugCompressionType::Z;
} else {
Opts.CompressDebugSections =
llvm::StringSwitch<llvm::DebugCompressionType>(A->getValue())
OpenPOWER on IntegriCloud