[compiler-rt] adf1ffe - [llvm] cmake config groundwork to have ZSTD in LLVM
Cole Kissane via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 12:36:37 PDT 2022
Author: Cole Kissane
Date: 2022-07-08T12:36:27-07:00
New Revision: adf1ffe95854a245cbc48bbaea55f60b003d5f76
URL: https://github.com/llvm/llvm-project/commit/adf1ffe95854a245cbc48bbaea55f60b003d5f76
DIFF: https://github.com/llvm/llvm-project/commit/adf1ffe95854a245cbc48bbaea55f60b003d5f76.diff
LOG: [llvm] cmake config groundwork to have ZSTD in LLVM
- added `FindZSTD.cmake`
- added a CMake option `LLVM_ENABLE_ZSTD` with behavior mirroring that of `LLVM_ENABLE_ZLIB`
- likewise added have_zstd to compiler-rt/test/lit.common.cfg.py, clang-tools-extra/clangd/test/lit.cfg.py, and several lit.site.cfg.py.in files mirroring have_zlib behavior
Reviewed By: leonardchan, MaskRay
Differential Revision: https://reviews.llvm.org/D128465
Added:
Modified:
compiler-rt/test/lit.common.cfg.py
llvm/lib/Support/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index a38c1308ecf4..90a6b0fa3382 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -217,7 +217,7 @@ def get_path_from_clang(args, allow_failure):
if config.have_zlib == "1":
config.available_features.add("zlib")
-
+
if config.have_zstd == "1":
config.available_features.add("zstd")
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index e1045e459d70..52b95c5377d3 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -25,6 +25,10 @@ if(LLVM_ENABLE_ZLIB)
set(imported_libs ZLIB::ZLIB)
endif()
+if(LLVM_ENABLE_ZSTD)
+ list(APPEND imported_libs zstd)
+endif()
+
if( MSVC OR MINGW )
# libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
# advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.
More information about the llvm-commits
mailing list