Skip to content

Commit adf1ffe

Browse files
committed
[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
1 parent f07caf2 commit adf1ffe

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

compiler-rt/test/lit.common.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def get_path_from_clang(args, allow_failure):
217217

218218
if config.have_zlib == "1":
219219
config.available_features.add("zlib")
220-
220+
221221
if config.have_zstd == "1":
222222
config.available_features.add("zstd")
223223

llvm/lib/Support/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ if(LLVM_ENABLE_ZLIB)
2525
set(imported_libs ZLIB::ZLIB)
2626
endif()
2727

28+
if(LLVM_ENABLE_ZSTD)
29+
list(APPEND imported_libs zstd)
30+
endif()
31+
2832
if( MSVC OR MINGW )
2933
# libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
3034
# advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.

0 commit comments

Comments
 (0)