Index: lld/test/CMakeLists.txt =================================================================== --- lld/test/CMakeLists.txt +++ lld/test/CMakeLists.txt @@ -14,7 +14,9 @@ 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 Index: lld/test/lit.cfg.py =================================================================== --- lld/test/lit.cfg.py +++ lld/test/lit.cfg.py @@ -88,10 +88,10 @@ # 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'): + 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: Index: lld/test/lit.site.cfg.py.in =================================================================== --- lld/test/lit.site.cfg.py.in +++ lld/test/lit.site.cfg.py.in @@ -7,7 +7,7 @@ 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@" Index: llvm/test/CMakeLists.txt =================================================================== --- llvm/test/CMakeLists.txt +++ llvm/test/CMakeLists.txt @@ -1,16 +1,17 @@ llvm_canonicalize_cmake_booleans( - LLVM_TOOL_LTO_BUILD + BUILD_SHARED_LIBS + HAVE_LIBXAR + HAVE_LIBZ HAVE_OCAMLOPT HAVE_OCAML_OUNIT - LLVM_INCLUDE_GO_TESTS - LLVM_USE_INTEL_JITEVENTS - HAVE_LIBZ - HAVE_LIBXAR LLVM_ENABLE_DIA_SDK LLVM_ENABLE_FFI LLVM_ENABLE_THREADS - BUILD_SHARED_LIBS + LLVM_INCLUDE_GO_TESTS + LLVM_LIBXML2_ENABLED LLVM_LINK_LLVM_DYLIB + LLVM_TOOL_LTO_BUILD + LLVM_USE_INTEL_JITEVENTS ) configure_lit_site_cfg( Index: llvm/test/lit.cfg.py =================================================================== --- llvm/test/lit.cfg.py +++ llvm/test/lit.cfg.py @@ -324,7 +324,7 @@ if config.enable_threads: config.available_features.add('thread_support') -if config.llvm_libxml2_enabled == '1': +if config.llvm_libxml2_enabled: config.available_features.add('libxml2') if config.have_opt_viewer_modules: Index: llvm/test/lit.site.cfg.py.in =================================================================== --- llvm/test/lit.site.cfg.py.in +++ llvm/test/lit.site.cfg.py.in @@ -39,7 +39,7 @@ config.enable_threads = @LLVM_ENABLE_THREADS@ config.build_shared_libs = @BUILD_SHARED_LIBS@ config.link_llvm_dylib = @LLVM_LINK_LLVM_DYLIB@ -config.llvm_libxml2_enabled = "@LLVM_LIBXML2_ENABLED@" +config.llvm_libxml2_enabled = @LLVM_LIBXML2_ENABLED@ config.llvm_host_triple = '@LLVM_HOST_TRIPLE@' config.host_arch = "@HOST_ARCH@" config.have_opt_viewer_modules = @LLVM_HAVE_OPT_VIEWER_MODULES@ Index: llvm/utils/gn/TODO.txt =================================================================== --- llvm/utils/gn/TODO.txt +++ llvm/utils/gn/TODO.txt @@ -20,8 +20,6 @@ - add dead code stripping - move run_tablegen.py from build to tablegen folder - figure out why -Iclang/Support gets added so often -- make LLVM_LIBXML2_ENABLED use llvm_canonicalize_cmake_boolean (cf D28294), - clean up both GN and CMake builds - plugin() template with working rpath, exports thingers - then port clang_build_examples and enable by default so that clang plugin tests run by default Index: llvm/utils/gn/secondary/lld/test/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/lld/test/BUILD.gn +++ llvm/utils/gn/secondary/lld/test/BUILD.gn @@ -45,7 +45,7 @@ if (llvm_enable_libxml2) { extra_values += [ "LLVM_LIBXML2_ENABLED=1" ] } else { - extra_values += [ "LLVM_LIBXML2_ENABLED=" ] # Must be empty. + extra_values += [ "LLVM_LIBXML2_ENABLED=0" ] # Must be 0. } if (llvm_enable_zlib) { Index: llvm/utils/gn/secondary/llvm/test/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/llvm/test/BUILD.gn +++ llvm/utils/gn/secondary/llvm/test/BUILD.gn @@ -140,7 +140,7 @@ if (llvm_enable_libxml2) { extra_values += [ "LLVM_LIBXML2_ENABLED=1" ] } else { - extra_values += [ "LLVM_LIBXML2_ENABLED=" ] # Must be empty. + extra_values += [ "LLVM_LIBXML2_ENABLED=0" ] # Must be 0. } if (llvm_enable_threads) {