[LLVMdev] proposal to avoid zlib dependency.
Dan Liew
dan at su-root.co.uk
Wed Sep 17 05:52:20 PDT 2014
>> 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"
)
```
Thanks,
Dan.
More information about the llvm-dev
mailing list