See https://maskray.me/blog/2022-09-09-zstd-compressed-debug-sections. We're blocked on bug 872254 though.
Good news is that we can get llvm to build with two-line zstdConfig.cmake generated at LLVM build time. Bad news is that LLD fails to build afterwards because -- of course -- it assumes LLVM magically takes care of setting the CMake targets for it.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=861536e5487b9c63f9cf878b4f2ecc3e8a220daf commit 861536e5487b9c63f9cf878b4f2ecc3e8a220daf Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2022-09-30 15:49:24 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2022-09-30 15:52:51 +0000 sys-devel/lld: Add zstd support to 16.x Bug: https://bugs.gentoo.org/873526 Signed-off-by: Michał Górny <mgorny@gentoo.org> sys-devel/lld/lld-16.0.0.9999.ebuild | 16 +++++++++++++--- sys-devel/lld/lld-16.0.0_pre20220930.ebuild | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70bf3a8996b9a14b0e28d7e367275a20f6d0cffc commit 70bf3a8996b9a14b0e28d7e367275a20f6d0cffc Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2022-09-30 13:49:51 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2022-09-30 15:52:50 +0000 sys-devel/llvm: Add zstd support in 16.x Bug: https://bugs.gentoo.org/873526 Signed-off-by: Michał Górny <mgorny@gentoo.org> sys-devel/llvm/llvm-16.0.0.9999.ebuild | 22 +++++++++++++++++++--- sys-devel/llvm/llvm-16.0.0_pre20220930.ebuild | 22 +++++++++++++++++++--- 2 files changed, 38 insertions(+), 6 deletions(-)
I suppose you meant lld and not lldb, right?
(In reply to Michał Górny from comment #3) > I suppose you meant lld and not lldb, right? I figured lldb needed support to read it, but apparently not: https://github.com/llvm/llvm-project/commit/0b140d0910d1762225fd10372d84ecca1a62305d.
I think this is done.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d99a19043e4cfe3270c7bf91ada6554d9d0382c4 commit d99a19043e4cfe3270c7bf91ada6554d9d0382c4 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-01-06 07:47:24 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-06 07:51:39 +0000 sys-devel/lld: ixup zlib, zstd handling From the LLVM docs: ``` LLVM_ENABLE_ZLIB:STRING Used to decide if LLVM tools should support compression/decompression with zlib. Allowed values are OFF, ON (default, enable if zlib is found), and FORCE_ON (error if zlib is not found). LLVM_ENABLE_ZSTD:STRING Used to decide if LLVM tools should support compression/decompression with zstd. Allowed values are OFF, ON (default, enable if zstd is found), and FORCE_ON (error if zstd is not found). ``` We had a user report that they had an LLVM / LLD built without zlib support despite the unconditional RDEPEND we have. Use FORCE_ON so we bail out at configure/build time rather than silently buliding without it if the system's zlib is broken. Ditto zstd. Bug: https://bugs.gentoo.org/873526 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/lld/lld-15.0.7.ebuild | 3 ++- sys-devel/lld/lld-16.0.6.ebuild | 4 +++- sys-devel/lld/lld-17.0.6.ebuild | 4 +++- sys-devel/lld/lld-18.0.0.9999.ebuild | 4 +++- sys-devel/lld/lld-18.0.0_pre20231215.ebuild | 4 +++- sys-devel/lld/lld-18.0.0_pre20231222.ebuild | 4 +++- sys-devel/lld/lld-18.0.0_pre20231228.ebuild | 4 +++- 7 files changed, 20 insertions(+), 7 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c060d95c3f33f1033c003575096609e0795a2951 commit c060d95c3f33f1033c003575096609e0795a2951 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-01-06 07:39:20 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-06 07:51:34 +0000 sys-devel/llvm: fixup zlib, zstd handling From the LLVM docs: ``` LLVM_ENABLE_ZLIB:STRING Used to decide if LLVM tools should support compression/decompression with zlib. Allowed values are OFF, ON (default, enable if zlib is found), and FORCE_ON (error if zlib is not found). LLVM_ENABLE_ZSTD:STRING Used to decide if LLVM tools should support compression/decompression with zstd. Allowed values are OFF, ON (default, enable if zstd is found), and FORCE_ON (error if zstd is not found). ``` We had a user report that they had an LLVM / LLD built without zlib support despite the unconditional RDEPEND we have. Use FORCE_ON so we bail out at configure/build time rather than silently buliding without it if the system's zlib is broken. Ditto zstd. Bug: https://bugs.gentoo.org/873526 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/llvm/llvm-15.0.7-r3.ebuild | 5 +++-- sys-devel/llvm/llvm-16.0.6.ebuild | 5 +++-- sys-devel/llvm/llvm-17.0.6.ebuild | 5 +++-- sys-devel/llvm/llvm-18.0.0.9999.ebuild | 5 +++-- sys-devel/llvm/llvm-18.0.0_pre20231215.ebuild | 5 +++-- sys-devel/llvm/llvm-18.0.0_pre20231222.ebuild | 5 +++-- sys-devel/llvm/llvm-18.0.0_pre20231228.ebuild | 5 +++-- 7 files changed, 21 insertions(+), 14 deletions(-)