]> granicus.if.org Git - clang/commit
Driver: add support for `-gz` and `-gz=`
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 11 Jun 2017 17:49:23 +0000 (17:49 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 11 Jun 2017 17:49:23 +0000 (17:49 +0000)
commitcec25f712cdde1362bf6be5bda0e8b164a40f6e6
tree6457f482ce6e81640e3792dbdf47d2eb7221784d
parentb9a2469400780e701d911fd294fcebaa40e7a99c
Driver: add support for `-gz` and `-gz=`

These options control the behaviour of the compression of debug info
sections on ELF targets.  Our behaviour slightly diverges from the
behaviour of GCC.  `-gz` maps to the `-compress-debug-sections` rather
than `-compress-debug-sections=zlib` or
`-compress-debug-sections=zlib-gnu`.  This small divergence allows us to
be compatible across versions of binutils (=zlib support was introduced
in 2.26, while earlier versions only support =zlib-gnu).  This also
allows users to not have to worry about the version of the assembler
they may be using if they are not using the IAS.  Previously, users
would have had to go through the internal option
`-compress-debug-sectionss` and pass that through to the assembler,
which is no longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305165 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/CC1Options.td
include/clang/Driver/Options.td
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/Gnu.cpp
lib/Frontend/CompilerInvocation.cpp
test/Driver/compress.c
tools/driver/cc1as_main.cpp