[compiler-rt] fe2f0ab - [compiler-rt] Use ZLIB_FOUND not LLVM_ENABLE_ZLIB

Alex Brachet via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 11:56:24 PDT 2023


Author: Alex Brachet
Date: 2023-05-25T18:55:47Z
New Revision: fe2f0ab37c33617c23e83d4999117e54fc34c14b

URL: https://github.com/llvm/llvm-project/commit/fe2f0ab37c33617c23e83d4999117e54fc34c14b
DIFF: https://github.com/llvm/llvm-project/commit/fe2f0ab37c33617c23e83d4999117e54fc34c14b.diff

LOG: [compiler-rt] Use ZLIB_FOUND not LLVM_ENABLE_ZLIB

LLVM_ENABLE_ZLIB is set to On by default and does not imply that ZLIB
was actually found, only being set to FORCE_ON would imply that it was
found before control reached compiler-rt/test/CMakeLists.txt. Instead,
use ZLIB_FOUND which guarantees that zlib is available.

Differential Revision: https://reviews.llvm.org/D151229

Added: 
    

Modified: 
    compiler-rt/test/CMakeLists.txt
    compiler-rt/test/lit.common.cfg.py
    compiler-rt/test/lit.common.configured.in

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt
index 69e17af0861c..3106ab73e9c2 100644
--- a/compiler-rt/test/CMakeLists.txt
+++ b/compiler-rt/test/CMakeLists.txt
@@ -12,6 +12,9 @@ option(COMPILER_RT_TEST_STANDALONE_BUILD_LIBS
 pythonize_bool(COMPILER_RT_TEST_STANDALONE_BUILD_LIBS)
 
 pythonize_bool(LLVM_ENABLE_EXPENSIVE_CHECKS)
+
+pythonize_bool(ZLIB_FOUND)
+
 configure_compiler_rt_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.common.configured.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.common.configured)

diff  --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index a6ecbd95e066..aeda48f5e813 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -231,7 +231,7 @@ def get_path_from_clang(args, allow_failure):
 
 config.available_features.add("host-byteorder-" + sys.byteorder + "-endian")
 
-if config.have_zlib == "1":
+if config.have_zlib:
     config.available_features.add("zlib")
 
 # Use ugly construction to explicitly prohibit "clang", "clang++" etc.

diff  --git a/compiler-rt/test/lit.common.configured.in b/compiler-rt/test/lit.common.configured.in
index 2546798033f0..6d1328331bc4 100644
--- a/compiler-rt/test/lit.common.configured.in
+++ b/compiler-rt/test/lit.common.configured.in
@@ -65,7 +65,7 @@ elif config.android:
 else:
   set_default("target_suffix", "-%s" % config.target_arch)
 
-set_default("have_zlib", "@LLVM_ENABLE_ZLIB@")
+set_default("have_zlib", @ZLIB_FOUND_PYBOOL@)
 set_default("libcxx_used", "@LLVM_LIBCXX_USED@")
 
 # LLVM tools dir can be passed in lit parameters, so try to


        


More information about the llvm-commits mailing list