diff options
author | Hans Wennborg <hans@chromium.org> | 2020-08-05 12:14:07 +0200 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-08-05 12:31:44 +0200 |
commit | 3ab01550b632dad46f9595d74855749557ffd25c (patch) | |
tree | 458fe6a5ca8ab23a5490647a83eaf34f10cee087 /llvm/lib/Support/Compression.cpp | |
parent | 927fc536ca225568f2ae853dddbb58e8712b1fbf (diff) | |
download | llvm-3ab01550b632dad46f9595d74855749557ffd25c.zip llvm-3ab01550b632dad46f9595d74855749557ffd25c.tar.gz llvm-3ab01550b632dad46f9595d74855749557ffd25c.tar.bz2 |
Revert "[CMake] Simplify CMake handling for zlib"
This quietly disabled use of zlib on Windows even when building with
-DLLVM_ENABLE_ZLIB=FORCE_ON.
> Rather than handling zlib handling manually, use find_package from CMake
> to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB,
> HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is
> set to YES, which requires the distributor to explicitly select whether
> zlib is enabled or not. This simplifies the CMake handling and usage in
> the rest of the tooling.
>
> This is a reland of abb0075 with all followup changes and fixes that
> should address issues that were reported in PR44780.
>
> Differential Revision: https://reviews.llvm.org/D79219
This reverts commit 10b1b4a231a485f1711d576e6131f6755e008abe and follow-ups
64d99cc6abed78c00a2a7863b02ce54911a5264f and
f9fec0447e12da9e8cf4b628f6d45f4941e7d182.
Diffstat (limited to 'llvm/lib/Support/Compression.cpp')
-rw-r--r-- | llvm/lib/Support/Compression.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Compression.cpp b/llvm/lib/Support/Compression.cpp index b8c77cf..27d92f0 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()); } |