[PATCH] D132870: tweak zstd behavior in cmake and llvm config for better testing
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 01:03:02 PDT 2022
phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Support/CMakeLists.txt:31-43
+ if(LLVM_PREFER_STATIC_ZSTD)
+ if(TARGET zstd::libzstd_static)
+ set(zstd_target zstd::libzstd_static)
+ else()
+ set(zstd_target zstd::libzstd_shared)
+ endif()
+ else()
----------------
I'd prefer a slightly simpler strategy which is to follow what linkers do (and what we also sometimes use elsewhere in the build): try shared first, if it doesn't exist use static plus provide a flag to skip the shared library search.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132870/new/
https://reviews.llvm.org/D132870
More information about the llvm-commits
mailing list