Skip to content

Commit 04d0a69

Browse files
committed
[ELF] Fix --compress-debug-sections=zstd when zlib is disabled
1 parent 3f37397 commit 04d0a69

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lld/ELF/Options.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ defm compress_debug_sections:
6868
MetaVarName<"[none,zlib,zstd]">;
6969

7070
defm compress_sections: EEq<"compress-sections",
71-
"Compress output sections that match the glob and do not have the SHF_ALLOC flag."
71+
"Compress output sections that match the glob and do not have the SHF_ALLOC flag. "
7272
"The compression level is <level> (if specified) or a default speed-focused level">,
7373
MetaVarName<"<section-glob>={none,zlib,zstd}[:level]">;
7474

lld/ELF/OutputSections.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,10 @@ template <class ELFT> void OutputSection::maybeCompress() {
438438
compressed.type = ELFCOMPRESS_ZLIB;
439439
compressed.checksum = checksum;
440440
}
441+
#endif
441442

442443
compressed.shards = std::move(shardsOut);
443444
flags |= SHF_COMPRESSED;
444-
#endif
445445
}
446446

447447
static void writeInt(uint8_t *buf, uint64_t data, uint64_t size) {

0 commit comments

Comments
 (0)