[lld] r351614 - Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [lld]

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 18 16:09:43 PST 2019


Author: nico
Date: Fri Jan 18 16:09:43 2019
New Revision: 351614

URL: http://llvm.org/viewvc/llvm-project?rev=351614&view=rev
Log:
Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [lld]

r291284 added a nice mechanism to consistently pass CMake on/off toggles to
lit. This change uses it for LLVM_LIBXML2_ENABLED too (which was added around
the same time and doesn't use the new system yet).

No intended behavior change.

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

Modified:
    lld/trunk/test/CMakeLists.txt
    lld/trunk/test/lit.cfg.py
    lld/trunk/test/lit.site.cfg.py.in

Modified: lld/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/CMakeLists.txt?rev=351614&r1=351613&r2=351614&view=diff
==============================================================================
--- lld/trunk/test/CMakeLists.txt (original)
+++ lld/trunk/test/CMakeLists.txt Fri Jan 18 16:09:43 2019
@@ -14,7 +14,9 @@ if(LLD_BUILT_STANDALONE)
 endif()
 
 llvm_canonicalize_cmake_booleans(
-  HAVE_LIBZ)
+  HAVE_LIBZ
+  LLVM_LIBXML2_ENABLED
+  )
 
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in

Modified: lld/trunk/test/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.cfg.py?rev=351614&r1=351613&r2=351614&view=diff
==============================================================================
--- lld/trunk/test/lit.cfg.py (original)
+++ lld/trunk/test/lit.cfg.py Fri Jan 18 16:09:43 2019
@@ -87,11 +87,11 @@ config.environment['LLD_IN_TEST'] = '1'
 # Indirectly check if the mt.exe Microsoft utility exists by searching for
 # cvtres, which always accompanies it.  Alternatively, check if we can use
 # libxml2 to merge manifests.
-if (lit.util.which('cvtres', config.environment['PATH'])) or \
-        (config.llvm_libxml2_enabled == '1'):
+if (lit.util.which('cvtres', config.environment['PATH']) or 
+        config.llvm_libxml2_enabled):
     config.available_features.add('manifest_tool')
 
-if (config.llvm_libxml2_enabled == '1'):
+if config.llvm_libxml2_enabled:
     config.available_features.add('libxml2')
 
 if config.have_dia_sdk:

Modified: lld/trunk/test/lit.site.cfg.py.in
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.site.cfg.py.in?rev=351614&r1=351613&r2=351614&view=diff
==============================================================================
--- lld/trunk/test/lit.site.cfg.py.in (original)
+++ lld/trunk/test/lit.site.cfg.py.in Fri Jan 18 16:09:43 2019
@@ -7,7 +7,7 @@ config.llvm_src_root = "@LLVM_SOURCE_DIR
 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
 config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.llvm_libxml2_enabled = "@LLVM_LIBXML2_ENABLED@"
+config.llvm_libxml2_enabled = @LLVM_LIBXML2_ENABLED@
 config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
 config.lld_obj_root = "@LLD_BINARY_DIR@"
 config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"




More information about the llvm-commits mailing list