[all-commits] [llvm/llvm-project] 449f2c: [ELF] Add --compress-debug-sections=zstd

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Sep 9 10:30:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 449f2ca146dde0ef14c9837f71d4a0be92ca4843
      https://github.com/llvm/llvm-project/commit/449f2ca146dde0ef14c9837f71d4a0be92ca4843
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-09-09 (Fri, 09 Sep 2022)

  Changed paths:
    M lld/ELF/Config.h
    M lld/ELF/Driver.cpp
    M lld/ELF/Options.td
    M lld/ELF/OutputSections.cpp
    M lld/docs/ReleaseNotes.rst
    M lld/docs/ld.lld.1
    M lld/test/ELF/compress-debug-sections-zstd.s

  Log Message:
  -----------
  [ELF] Add --compress-debug-sections=zstd

`clang -gz=zstd a.o` passes this option to the linker. This option compresses output
debug sections with zstd and sets ch_type to ELFCOMPRESS_ZSTD. As of today, very
few DWARF consumers recognize ELFCOMPRESS_ZSTD.

Use the llvm::zstd::compress API with level llvm::zstd::DefaultCompression (5),
which we may tune after we have more experience with zstd output.
zstd has built-in parallel compression support (so we don't need to do D117853
for zlib), which is not leveraged yet.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D133548




More information about the All-commits mailing list