diff --git a/lld/test/CMakeLists.txt b/lld/test/CMakeLists.txt index 1b908335c4a14c6d3fe70941ce5aff0c07334900..64aa1f7cb3e23a66356316162085bde1d9dfa1ef 100644 --- a/lld/test/CMakeLists.txt +++ b/lld/test/CMakeLists.txt @@ -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 diff --git a/lld/test/lit.cfg.py b/lld/test/lit.cfg.py index e53ff87400350336809c32efa9a167972980f3bd..350b40a1008115e48feb5436f388d8f26401c0c4 100644 --- a/lld/test/lit.cfg.py +++ b/lld/test/lit.cfg.py @@ -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: diff --git a/lld/test/lit.site.cfg.py.in b/lld/test/lit.site.cfg.py.in index 7475ac7eaa7f831141f791ca5debd653166e949c..07ffc2303e114b8125bc8762b80e2f7f1faf1111 100644 --- a/lld/test/lit.site.cfg.py.in +++ b/lld/test/lit.site.cfg.py.in @@ -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@"