For a -DCMAKE_BUILD_TYPE=Debug build of clang with 265MiB SHF_ALLOC sections and 920MiB uncompressed debug sections. ``` % =time -f "CPU: %Us\tReal: %es\tRAM: %MKB" ld.bfd @response.txt -o bfd CPU: 69.17s Real: 78.50s RAM: 6689800KB % =time -f "CPU: %Us\tReal: %es\tRAM: %MKB" ld.bfd @response.txt -o bfd --compress-debug-sections=zlib CPU: 96.18s Real: 104.31s RAM: 7469100KB ``` With a parallel implementation, the compile time can be decreased to below 3 seconds with parallel divide-and-conquer with 8 threads. I will add a parallel implementation to ld.lld (https://maskray.me/blog/2022-01-23-compressed-debug-sections).
Not a bug, an advert for lld.
This is a feature request. Compressing debug sections is slow. Parallelism, even with zstd, is pretty important.