diff options
author | Fangrui Song <i@maskray.me> | 2024-05-07 16:56:45 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-05-07 16:56:45 -0700 |
commit | 04d0a691af9e116f651d233c5689863f614d3adf (patch) | |
tree | 3ab60ec33d853e0373975799945e50f326473161 | |
parent | 3f37397c959a85f4cad91b655ea03a5d2450ab38 (diff) | |
download | llvm-04d0a691af9e116f651d233c5689863f614d3adf.zip llvm-04d0a691af9e116f651d233c5689863f614d3adf.tar.gz llvm-04d0a691af9e116f651d233c5689863f614d3adf.tar.bz2 |
[ELF] Fix --compress-debug-sections=zstd when zlib is disabled
-rw-r--r-- | lld/ELF/Options.td | 2 | ||||
-rw-r--r-- | lld/ELF/OutputSections.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td index 73a4f96..b9e05a4 100644 --- a/lld/ELF/Options.td +++ b/lld/ELF/Options.td @@ -68,7 +68,7 @@ defm compress_debug_sections: MetaVarName<"[none,zlib,zstd]">; defm compress_sections: EEq<"compress-sections", - "Compress output sections that match the glob and do not have the SHF_ALLOC flag." + "Compress output sections that match the glob and do not have the SHF_ALLOC flag. " "The compression level is <level> (if specified) or a default speed-focused level">, MetaVarName<"<section-glob>={none,zlib,zstd}[:level]">; diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 2dbbff0..9c66724 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -438,10 +438,10 @@ template <class ELFT> void OutputSection::maybeCompress() { compressed.type = ELFCOMPRESS_ZLIB; compressed.checksum = checksum; } +#endif compressed.shards = std::move(shardsOut); flags |= SHF_COMPRESSED; -#endif } static void writeInt(uint8_t *buf, uint64_t data, uint64_t size) { |