Skip to content

Commit b166d7e

Browse files
committedJan 19, 2019
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 llvm-svn: 351614
1 parent 8e7600d commit b166d7e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed
 

‎lld/test/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ if(LLD_BUILT_STANDALONE)
1414
endif()
1515

1616
llvm_canonicalize_cmake_booleans(
17-
HAVE_LIBZ)
17+
HAVE_LIBZ
18+
LLVM_LIBXML2_ENABLED
19+
)
1820

1921
configure_lit_site_cfg(
2022
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in

‎lld/test/lit.cfg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@
8787
# Indirectly check if the mt.exe Microsoft utility exists by searching for
8888
# cvtres, which always accompanies it. Alternatively, check if we can use
8989
# libxml2 to merge manifests.
90-
if (lit.util.which('cvtres', config.environment['PATH'])) or \
91-
(config.llvm_libxml2_enabled == '1'):
90+
if (lit.util.which('cvtres', config.environment['PATH']) or
91+
config.llvm_libxml2_enabled):
9292
config.available_features.add('manifest_tool')
9393

94-
if (config.llvm_libxml2_enabled == '1'):
94+
if config.llvm_libxml2_enabled:
9595
config.available_features.add('libxml2')
9696

9797
if config.have_dia_sdk:

‎lld/test/lit.site.cfg.py.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ config.llvm_src_root = "@LLVM_SOURCE_DIR@"
77
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
88
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
99
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
10-
config.llvm_libxml2_enabled = "@LLVM_LIBXML2_ENABLED@"
10+
config.llvm_libxml2_enabled = @LLVM_LIBXML2_ENABLED@
1111
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
1212
config.lld_obj_root = "@LLD_BINARY_DIR@"
1313
config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"

0 commit comments

Comments
 (0)
Please sign in to comment.