aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/CMakeLists.txt2
-rw-r--r--llvm/lib/Support/CMakeLists.txt16
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()