[LLVMdev] proposal to avoid zlib dependency.

İsmail Dönmez ismail at donmez.ws
Wed Sep 17 06:05:56 PDT 2014


On Wed, Sep 17, 2014 at 3:52 PM, Dan Liew <dan at su-root.co.uk> wrote:
>>> IIUC zlib availability is tested and the library used if present. Do you
>>> mean that LLVM does not use zlib on Windows when the library is present?
>>
>>
>> Sure, but if there aren't instructions for how to do it easily, then it's
>> effectively unsupported. There isn't really a canonical way to "install"
>> headers and libraries on Windows like you would on Linux.
>>
>> It probably works on MinGW, but then you're a MinGW binary in a MinGW world.
>
> I really don't like the idea of bundling zlib. I'm not aware of LLVM
> bundling any external libraries currently and I don't think now is a
> good time to start. Based on what has been discussed so far it sounds
> like it's "possible" to build zlib (or use a prebuilt binary) on
> windows and use it within LLVM so surely the right solution is...
>
> * Document how zlib can by LLVM on windows.
> * Improve our detection of zlib. I glanced at the the CMake files and
> we aren't using ``find_package(zlib)`` which surprises me. Packages
> exist in CMake to abstract away the issue of finding where header
> files and libraries actually live. I glanced at the implementation of
> FindZLIB.cmake and it looks like it has Windows support because I see
>
> ```
> # Normal search.
> set(_ZLIB_SEARCH_NORMAL
>   PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
>         "$ENV{PROGRAMFILES}/zlib"
>   )
> ```

So installing zlib from
http://gnuwin32.sourceforge.net/packages/zlib.htm should work fine.



More information about the llvm-dev mailing list