[Lldb-commits] [lldb] r322081 - [test] Fix tests to use more portable LLVM_ENABLE_ZLIB

Michal Gorny via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 9 06:44:04 PST 2018


Author: mgorny
Date: Tue Jan  9 06:44:04 2018
New Revision: 322081

URL: http://llvm.org/viewvc/llvm-project?rev=322081&view=rev
Log:
[test] Fix tests to use more portable LLVM_ENABLE_ZLIB

The HAVE_LIBZ variable is not exported by LLVM, and therefore is not
available in stand-alone builds of other tools. Use LLVM_ENABLE_ZLIB
which is the name under which the effective value is exported.

Additional, use llvm_canonicalize_cmake_booleans() to make sure that
a correct (Python-safe) boolean value is passed down to lit.

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

Modified:
    lldb/trunk/lit/CMakeLists.txt
    lldb/trunk/lit/lit.site.cfg.in

Modified: lldb/trunk/lit/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/CMakeLists.txt?rev=322081&r1=322080&r2=322081&view=diff
==============================================================================
--- lldb/trunk/lit/CMakeLists.txt (original)
+++ lldb/trunk/lit/CMakeLists.txt Tue Jan  9 06:44:04 2018
@@ -11,6 +11,10 @@ else()
   set(ENABLE_SHARED 0)
 endif(BUILD_SHARED_LIBS)
 
+# the value is not canonicalized within LLVM
+llvm_canonicalize_cmake_booleans(
+  LLVM_ENABLE_ZLIB)
+
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)

Modified: lldb/trunk/lit/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/lit.site.cfg.in?rev=322081&r1=322080&r2=322081&view=diff
==============================================================================
--- lldb/trunk/lit/lit.site.cfg.in (original)
+++ lldb/trunk/lit/lit.site.cfg.in Tue Jan  9 06:44:04 2018
@@ -12,7 +12,7 @@ config.target_triple = "@TARGET_TRIPLE@"
 config.python_executable = "@PYTHON_EXECUTABLE@"
 config.cc = "@LLDB_TEST_C_COMPILER@"
 config.cxx = "@LLDB_TEST_CXX_COMPILER@"
-config.have_zlib = @HAVE_LIBZ@
+config.have_zlib = @LLVM_ENABLE_ZLIB@
 
 # Support substitution of the tools and libs dirs with user parameters. This is
 # used when we can't determine the tool dir at configuration time.




More information about the lldb-commits mailing list