diff options
Diffstat (limited to 'lld/test')
-rw-r--r-- | lld/test/CMakeLists.txt | 11 | ||||
-rw-r--r-- | lld/test/lit.site.cfg.py.in | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lld/test/CMakeLists.txt b/lld/test/CMakeLists.txt index 52e6118..74b29f5 100644 --- a/lld/test/CMakeLists.txt +++ b/lld/test/CMakeLists.txt @@ -4,8 +4,17 @@ set(LLVM_BUILD_MODE "%(build_mode)s") set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s") set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/%(build_config)s") +if(LLD_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() + llvm_canonicalize_cmake_booleans( - LLVM_ENABLE_ZLIB + HAVE_LIBZ LLVM_LIBXML2_ENABLED ) diff --git a/lld/test/lit.site.cfg.py.in b/lld/test/lit.site.cfg.py.in index 3d4c51f..4aa2fcd 100644 --- a/lld/test/lit.site.cfg.py.in +++ b/lld/test/lit.site.cfg.py.in @@ -14,7 +14,7 @@ config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@" config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" config.target_triple = "@TARGET_TRIPLE@" config.python_executable = "@Python3_EXECUTABLE@" -config.have_zlib = @LLVM_ENABLE_ZLIB@ +config.have_zlib = @HAVE_LIBZ@ config.sizeof_void_p = @CMAKE_SIZEOF_VOID_P@ # Support substitution of the tools and libs dirs with user parameters. This is |