[all-commits] [llvm/llvm-project] 5279e6: [cmake] Fix Findzstd.cmake to handle OpenBSD share...

Michał Górny via All-commits all-commits at lists.llvm.org
Tue Nov 22 21:51:13 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5279e6a7d677cdf4488883b77aacab911318100c
      https://github.com/llvm/llvm-project/commit/5279e6a7d677cdf4488883b77aacab911318100c
  Author: Michał Górny <mgorny at gentoo.org>
  Date:   2022-11-23 (Wed, 23 Nov 2022)

  Changed paths:
    M llvm/cmake/modules/Findzstd.cmake

  Log Message:
  -----------
  [cmake] Fix Findzstd.cmake to handle OpenBSD shared libraries

Fix Findzstd CMake to handle shared libraries on OpenBSD correctly.
This userland does not use shared library symlinks without SOVERSION,
so the result of find_library() does not ever end with
zstd_SHARED_LIBRARY_SUFFIX.  To work around this, reverse the logic
to compare the result against zstd_STATIC_LIBRARY_SUFFIX and assume
shared library otherwise.

While at it, fix the conditions not to fall back to "result is static
library" path if it actually was recognized as a shared library but
zstd_shared target already existed.

Fixes #59056

Differential Revision: https://reviews.llvm.org/D138361




More information about the All-commits mailing list