aboutsummaryrefslogtreecommitdiff
path: root/lld/test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lld/test/CMakeLists.txt')
-rw-r--r--lld/test/CMakeLists.txt11
1 files changed, 10 insertions, 1 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
)