diff options
| author | Hans Wennborg <hans@chromium.org> | 2020-03-03 09:45:14 +0100 |
|---|---|---|
| committer | Hans Wennborg <hans@chromium.org> | 2020-03-03 14:31:05 +0100 |
| commit | 5f9211bc46fa1a8d1db3a2bc27c2b115cd617795 (patch) | |
| tree | 24cc9f1548a9fe44c228bb76c9e6f5d09a879e3c /clang/test | |
| parent | 001c8aac80e3924c33a4cc644cca58401c72fe6b (diff) | |
| download | bcm5719-llvm-5f9211bc46fa1a8d1db3a2bc27c2b115cd617795.tar.gz bcm5719-llvm-5f9211bc46fa1a8d1db3a2bc27c2b115cd617795.zip | |
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.
(cherry picked from commit 916be8fd6a0a0feea4cefcbeb0c22c65848d7a2e)
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | clang/test/lit.site.cfg.py.in | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt index 2c6487e8c26..7fdc7d0be79 100644 --- a/clang/test/CMakeLists.txt +++ b/clang/test/CMakeLists.txt @@ -9,6 +9,15 @@ endif () string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) +if(CLANG_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( CLANG_BUILD_EXAMPLES CLANG_ENABLE_ARCMT @@ -16,7 +25,7 @@ llvm_canonicalize_cmake_booleans( CLANG_SPAWN_CC1 ENABLE_BACKTRACES ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER - LLVM_ENABLE_ZLIB + HAVE_LIBZ LLVM_ENABLE_PER_TARGET_RUNTIME_DIR LLVM_ENABLE_PLUGINS LLVM_ENABLE_THREADS) diff --git a/clang/test/lit.site.cfg.py.in b/clang/test/lit.site.cfg.py.in index e9b35ac0177..520afab6af8 100644 --- a/clang/test/lit.site.cfg.py.in +++ b/clang/test/lit.site.cfg.py.in @@ -16,7 +16,7 @@ config.host_triple = "@LLVM_HOST_TRIPLE@" config.target_triple = "@TARGET_TRIPLE@" config.host_cxx = "@CMAKE_CXX_COMPILER@" config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" -config.have_zlib = @LLVM_ENABLE_ZLIB@ +config.have_zlib = @HAVE_LIBZ@ config.clang_arcmt = @CLANG_ENABLE_ARCMT@ config.clang_default_cxx_stdlib = "@CLANG_DEFAULT_CXX_STDLIB@" config.clang_staticanalyzer = @CLANG_ENABLE_STATIC_ANALYZER@ |

