aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Compression.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2020-03-03 09:45:14 +0100
committerHans Wennborg <hans@chromium.org>2020-03-03 11:03:09 +0100
commit916be8fd6a0a0feea4cefcbeb0c22c65848d7a2e (patch)
tree4e8be527a632a1df69358414e9c59c52fbdd3a11 /llvm/lib/Support/Compression.cpp
parent4e363563fa149321514389a031fa063e998d7422 (diff)
downloadllvm-916be8fd6a0a0feea4cefcbeb0c22c65848d7a2e.zip
llvm-916be8fd6a0a0feea4cefcbeb0c22c65848d7a2e.tar.gz
llvm-916be8fd6a0a0feea4cefcbeb0c22c65848d7a2e.tar.bz2
Revert abb00753 "build: reduce CMake handling for zlib" (PR44780)
and follow-ups: a2ca1c2d "build: disable zlib by default on Windows" 2181bf40 "[CMake] Link against ZLIB::ZLIB" 1079c68a "Attempt to fix ZLIB CMake logic on Windows" This changed the output of llvm-config --system-libs, and more importantly it broke stand-alone builds. Instead of piling on more fix attempts, let's revert this to reduce the risk of more breakages.
Diffstat (limited to 'llvm/lib/Support/Compression.cpp')
-rw-r--r--llvm/lib/Support/Compression.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Compression.cpp b/llvm/lib/Support/Compression.cpp
index 4165a27..97d5ffa 100644
--- a/llvm/lib/Support/Compression.cpp
+++ b/llvm/lib/Support/Compression.cpp
@@ -17,13 +17,13 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
-#if LLVM_ENABLE_ZLIB
+#if LLVM_ENABLE_ZLIB == 1 && HAVE_ZLIB_H
#include <zlib.h>
#endif
using namespace llvm;
-#if LLVM_ENABLE_ZLIB
+#if LLVM_ENABLE_ZLIB == 1 && HAVE_LIBZ
static Error createError(StringRef Err) {
return make_error<StringError>(Err, inconvertibleErrorCode());
}