[llvm] fix zstd_shared detection on mingw (PR #139945)

Jameson Nash via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 06:54:04 PDT 2025


================
@@ -29,11 +29,11 @@ find_package_handle_standard_args(
 )
 
 if(zstd_FOUND)
-  if(zstd_LIBRARY MATCHES "${zstd_STATIC_LIBRARY_SUFFIX}$")
+  if(zstd_LIBRARY MATCHES "${zstd_STATIC_LIBRARY_SUFFIX}$" AND NOT zstd_LIBRARY MATCHES "\\.dll\\.a$")
----------------
vtjnash wrote:

Upstream also seems to consider the use of `CMAKE_IMPORT_LIBRARY_SUFFIX` in this file to be unsupported behavior (https://gitlab.kitware.com/cmake/cmake/-/issues/21180#note_828866), since it is a configuration variable for the llvm target, and not relevant to the zstd dependencies, as it is used for here, so I would rather not add more uses of it

https://github.com/llvm/llvm-project/pull/139945


More information about the llvm-commits mailing list