[Lldb-commits] [PATCH] D41725: [lldb] [test] Fix missing HAVE_LIBZ for tests in stand-alone builds
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 4 05:54:34 PST 2018
mgorny created this revision.
mgorny added reviewers: labath, zturner, beanz.
The HAVE_LIBZ variable is not exported by LLVM, and therefore is not
available for reuse in stand-alone builds of other tools. Redefine it
based on the value of LLVM_ENABLE_ZLIB. The same change has been already
implemented in clang r285741.
Additional, use llvm_canonicalize_cmake_booleans() to make sure that
a correct (safe) boolean value is passed down to lit.
// Note: probably all those ifdefs need to be fixed as well but that's a matter for a separate patch.
https://reviews.llvm.org/D41725
Files:
lit/CMakeLists.txt
Index: lit/CMakeLists.txt
===================================================================
--- lit/CMakeLists.txt
+++ lit/CMakeLists.txt
@@ -10,6 +10,17 @@
else()
set(ENABLE_SHARED 0)
endif(BUILD_SHARED_LIBS)
+if(LLDB_BUILT_STANDALONE)
+ # Set HAVE_LIBZ according to recorded LLVM_ENABLE_ZLIB value. This
+ # value is forced to 0 if zlib was not found, so it is fine to use it
+ # instead of HAVE_LIBZ (not recorded).
+ if(LLVM_ENABLE_ZLIB)
+ set(HAVE_LIBZ 1)
+ endif()
+endif()
+
+llvm_canonicalize_cmake_booleans(
+ HAVE_LIBZ)
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41725.128608.patch
Type: text/x-patch
Size: 620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180104/be75838a/attachment.bin>
More information about the lldb-commits
mailing list