diff options
author | Cole <cole.kissane@gmail.com> | 2022-09-02 21:00:07 +0000 |
---|---|---|
committer | Tobias Hieta <tobias@hieta.se> | 2022-10-04 11:29:17 +0200 |
commit | 4bd3f3759259548e159aeba5c76efb9a0864e6fa (patch) | |
tree | 37a44f70defb3c3403b44e08181cf347b4311fc1 | |
parent | 55d4d86e388514f8ff5872e08f0d1e5d6865acdb (diff) | |
download | llvm-llvmorg-15.0.2.zip llvm-llvmorg-15.0.2.tar.gz llvm-llvmorg-15.0.2.tar.bz2 |
use LLVM_USE_STATIC_ZSTDllvmorg-15.0.2
removes LLVM_PREFER_STATIC_ZSTD in favor of using a LLVM_USE_STATIC_ZSTD
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D133222
(cherry picked from commit fc1da043f4f9198303abd6f643cf23439115ce73)
-rw-r--r-- | llvm/CMakeLists.txt | 2 | ||||
-rw-r--r-- | llvm/lib/Support/CMakeLists.txt | 16 |
2 files changed, 4 insertions, 14 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 75e9759..fddb8ff 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -446,7 +446,7 @@ set(LLVM_ENABLE_ZLIB "ON" CACHE STRING "Use zlib for compression/decompression i set(LLVM_ENABLE_ZSTD "ON" CACHE STRING "Use zstd for compression/decompression if available. Can be ON, OFF, or FORCE_ON") -set(LLVM_PREFER_STATIC_ZSTD TRUE CACHE BOOL "Use static version of zstd if available. Can be TRUE, FALSE") +set(LLVM_USE_STATIC_ZSTD FALSE CACHE BOOL "Use static version of zstd. Can be TRUE, FALSE") set(LLVM_ENABLE_CURL "OFF" CACHE STRING "Use libcurl for the HTTP client if available. Can be ON, OFF, or FORCE_ON") diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt index d53b21d..806cbc8 100644 --- a/llvm/lib/Support/CMakeLists.txt +++ b/llvm/lib/Support/CMakeLists.txt @@ -25,21 +25,11 @@ if(LLVM_ENABLE_ZLIB) list(APPEND imported_libs ZLIB::ZLIB) endif() -set(zstd_target none) - if(LLVM_ENABLE_ZSTD) - if(LLVM_PREFER_STATIC_ZSTD) - if(TARGET zstd::libzstd_static) - set(zstd_target zstd::libzstd_static) - else() - set(zstd_target zstd::libzstd_shared) - endif() + if(TARGET zstd::libzstd_shared AND NOT LLVM_USE_STATIC_ZSTD) + set(zstd_target zstd::libzstd_shared) else() - if(TARGET zstd::libzstd_shared) - set(zstd_target zstd::libzstd_shared) - else() - set(zstd_target zstd::libzstd_static) - endif() + set(zstd_target zstd::libzstd_static) endif() endif() |