Temporarily revert "Change -gz and -Wa,--compress-debug-sections to use gABI compress...
authorEric Christopher <echristo@gmail.com>
Tue, 14 May 2019 19:40:42 +0000 (19:40 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 14 May 2019 19:40:42 +0000 (19:40 +0000)
This affects users of older (pre 2.26) binutils in such a way that they can't necessarily
work around it as it doesn't support the compress option on the command line. Reverting
to unblock them and we can revisit whether to make this change now or fix how we want
to express the option.

This reverts commit bdb21337e6e1732c9895966449c33c408336d295/r360403.

llvm-svn: 360703

clang/docs/ReleaseNotes.rst
clang/lib/Frontend/CompilerInvocation.cpp
clang/tools/driver/cc1as_main.cpp

index cf15a024fca335d34b372d30c2cd5ebc0ad54d5d..1f09655027fc46940b4f0565401830a87be0c8fb 100644 (file)
@@ -77,10 +77,7 @@ Modified Compiler Flags
 
 - `clang -dumpversion` now returns the version of Clang itself.
 
-- On ELF, ``-gz`` now defaults to ``-gz=zlib``. It produces ``SHF_COMPRESSED``
-  style compression of debug information. GNU binutils 2.26 or newer, or lld is
-  required to link produced object files. Use ``-gz=zlib-gnu`` to get the old
-  behavior.
+- ...
 
 New Pragmas in Clang
 --------------------
index e9137bb73c9cd74a39d81d53f6a63b1c9987922d..8a2dbcddfa9931312533ea31598c5b347a41b0d3 100644 (file)
@@ -1052,7 +1052,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   if (const Arg *A = Args.getLastArg(OPT_compress_debug_sections,
                                      OPT_compress_debug_sections_EQ)) {
     if (A->getOption().getID() == OPT_compress_debug_sections) {
-      Opts.setCompressDebugSections(llvm::DebugCompressionType::Z);
+      // TODO: be more clever about the compression type auto-detection
+      Opts.setCompressDebugSections(llvm::DebugCompressionType::GNU);
     } else {
       auto DCT = llvm::StringSwitch<llvm::DebugCompressionType>(A->getValue())
                      .Case("none", llvm::DebugCompressionType::None)
index f9c25399b372c016465b0953ad8c78867dadf463..c0334609be5f76f1fefde08198a36065dc3d25c2 100644 (file)
@@ -221,7 +221,8 @@ 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) {
-      Opts.CompressDebugSections = llvm::DebugCompressionType::Z;
+      // TODO: be more clever about the compression type auto-detection
+      Opts.CompressDebugSections = llvm::DebugCompressionType::GNU;
     } else {
       Opts.CompressDebugSections =
           llvm::StringSwitch<llvm::DebugCompressionType>(A->getValue())