[PATCH] D24869: [cfe] [test] Fix detecting LLVM zlib support in stand-alone builds

2016-11-01 Thread Michał Górny via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL285741: [test] Fix detecting LLVM zlib support in 
stand-alone builds (authored by mgorny).

Changed prior to commit:
  https://reviews.llvm.org/D24869?vs=72258=76625#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24869

Files:
  cfe/trunk/test/CMakeLists.txt


Index: cfe/trunk/test/CMakeLists.txt
===
--- cfe/trunk/test/CMakeLists.txt
+++ cfe/trunk/test/CMakeLists.txt
@@ -9,6 +9,15 @@
 
 string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR 
${LLVM_RUNTIME_OUTPUT_INTDIR})
 
+if(CLANG_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()
+
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg


Index: cfe/trunk/test/CMakeLists.txt
===
--- cfe/trunk/test/CMakeLists.txt
+++ cfe/trunk/test/CMakeLists.txt
@@ -9,6 +9,15 @@
 
 string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
 
+if(CLANG_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()
+
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D24869: [cfe] [test] Fix detecting LLVM zlib support in stand-alone builds

2016-11-01 Thread Chris Bieneman via cfe-commits
beanz accepted this revision.
beanz added a comment.
This revision is now accepted and ready to land.

LGTM!


https://reviews.llvm.org/D24869



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D24869: [cfe] [test] Fix detecting LLVM zlib support in stand-alone builds

2016-10-29 Thread Michał Górny via cfe-commits
mgorny added a comment.

Non-gentle ping?


https://reviews.llvm.org/D24869



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D24869: [cfe] [test] Fix detecting LLVM zlib support in stand-alone builds

2016-10-18 Thread Michał Górny via cfe-commits
mgorny added a comment.

Gentle ping.


https://reviews.llvm.org/D24869



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D24869: [cfe] [test] Fix detecting LLVM zlib support in stand-alone builds

2016-09-23 Thread Michał Górny via cfe-commits
mgorny added a comment.

For the record: I've tested the patch with and without zlib installed, using 
in-tree and stand-alone builds.


https://reviews.llvm.org/D24869



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D24869: [cfe] [test] Fix detecting LLVM zlib support in stand-alone builds

2016-09-23 Thread Michał Górny via cfe-commits
mgorny created this revision.
mgorny added reviewers: rsmith, beanz, samsonov.
mgorny added a subscriber: cfe-commits.
Herald added subscribers: mgorny, beanz.

Fix the test run to declare missing HAVE_LIBZ value in stand-alone builds, 
using the LLVM_ENABLE_ZLIB that is exported in LLVMConfig.cmake.

When using in-tree builds, HAVE_LIBZ is declared in cmake/config-ix.cmake as a 
result of LLVM's CMake checks. When building stand-alone, this value is not 
available and as a result caused clang to wrongly assume that LLVM was built 
without zlib support.

To fix it, set it to the value of LLVM_ENABLE_ZLIB. While this variable is 
originally used to control the user preference, LLVM updates its value to 0 if 
zlib checks fail. Therefore, we can use it to reliably determine whether LLVM 
was built with zlib support or not.


https://reviews.llvm.org/D24869

Files:
  test/CMakeLists.txt

Index: test/CMakeLists.txt
===
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -9,6 +9,15 @@
 
 string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR 
${LLVM_RUNTIME_OUTPUT_INTDIR})
 
+if(CLANG_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()
+
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg


Index: test/CMakeLists.txt
===
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -9,6 +9,15 @@
 
 string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
 
+if(CLANG_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()
+
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits