[Lldb-commits] [PATCH] D128465: [llvm] add zstd to `llvm::compression` namespace

Petr Hosek via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 19 12:32:29 PDT 2022


phosek added a comment.

In D128465#3800479 <https://reviews.llvm.org/D128465#3800479>, @andrewrk wrote:

>   if(LLVM_ENABLE_ZSTD)
>     list(APPEND imported_libs zstd::libzstd_shared)
>   endif()
>
> This hard codes shared linking which breaks the use case of static linking LLVM.

This was addressed by D132870 <https://reviews.llvm.org/D132870> and D133222 <https://reviews.llvm.org/D133222>.

> Also LLVM needs to now include a Findzstd.cmake file or else we get this error:
>
>   CMake Error at cmake/config-ix.cmake:144 (find_package):
>     By not providing "Findzstd.cmake" in CMAKE_MODULE_PATH this project has
>     asked CMake to find a package configuration file provided by "zstd", but
>     CMake did not find one.
>   
>     Could not find a package configuration file provided by "zstd" with any of
>     the following names:
>   
>       zstdConfig.cmake
>       zstd-config.cmake
>   
>     Add the installation prefix of "zstd" to CMAKE_PREFIX_PATH or set
>     "zstd_DIR" to a directory containing one of the above files.  If "zstd"
>     provides a separate development package or SDK, be sure it has been
>     installed.
>   Call Stack (most recent call first):
>     CMakeLists.txt:774 (include)
>
> It is impossible to satisfy this dependency when bootstrapping a static build of zig without patching LLVM.

It should be possible to use `CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON` to pick up config file that's part of the zstd installation, but I'd be also fine including `Findzstd.cmake` in LLVM to avoid needing that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128465/new/

https://reviews.llvm.org/D128465



More information about the lldb-commits mailing list