summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-12-01 11:41:07 +0000
committerPavel Labath <labath@google.com>2017-12-01 11:41:07 +0000
commit11ce6e6a83e42eb2d9871f76158ccf41238074aa (patch)
tree704105fc84685a856daa3f70b9629f9eb9843320 /llvm/lib/Support
parentb8dd5078ee233fc60a90a930625ce7ddfc80df45 (diff)
downloadbcm5719-llvm-11ce6e6a83e42eb2d9871f76158ccf41238074aa.tar.gz
bcm5719-llvm-11ce6e6a83e42eb2d9871f76158ccf41238074aa.zip
[cmake] Enable zlib support on windows
Summary: zlib support was hard-wired to off for (non-cygwin) windows targets. This disables some features, such as reading debug info from compressed dwarf sections. This has been this way since zlib support was added in 2013 (r180083), but there is no obvious reason for that. Zlib is perfectly capable of being compiled for windows (it even has a cmake file that works out of the box). This enables one to turn on zlib support on windows, if one has zlib avaliable. Reviewers: rnk, beanz Subscribers: mgorny, aprantl, llvm-commits Differential Revision: https://reviews.llvm.org/D40655 llvm-svn: 319533
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index 5d95a9a9a56..f2a59ec2743 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -1,4 +1,7 @@
set(system_libs)
+if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
+ set(system_libs ${system_libs} ${ZLIB_LIBRARY_PATH})
+endif()
if( MSVC OR MINGW )
# libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
set(system_libs ${system_libs} psapi shell32 ole32 uuid)
@@ -21,9 +24,6 @@ elseif( CMAKE_HOST_UNIX )
set(system_libs ${system_libs} atomic)
endif()
set(system_libs ${system_libs} ${LLVM_PTHREAD_LIB})
- if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
- set(system_libs ${system_libs} z)
- endif()
if( UNIX AND NOT (BEOS OR HAIKU) )
set(system_libs ${system_libs} m)
endif()
OpenPOWER on IntegriCloud