[llvm-dev] Commit zlib source code into to llvm repo

Mehdi Amini via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 23 16:58:42 PDT 2016


Hi Vitaly,

Can you go over the exact use case with a bit more details? (i.e. without assuming we’re all familiar with the product, who are the user, and how are they using it).
That’d help to understand the need dump an external library source code directly inside LLVM.

Also have you consider changing the LLVM build system to build zlib optionally as an external project? (Like we can include clang -DLLVM_EXTERNAL_CLANG_DIR=….) 

— 
Mehdi



> On Sep 23, 2016, at 4:35 PM, Vitaly Buka <vitalybuka at google.com> wrote:
> 
> Yes, zlib build for LTO will work, but user will have to build this lib from zlib source code anyway.
> 
> On Fri, Sep 23, 2016 at 4:01 PM Mehdi Amini <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>> wrote:
> 
>> On Sep 23, 2016, at 1:44 PM, Vitaly Buka via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>> 
>> Hi all,
>> 
>> Is it possible to add zlib source code into llvm repo? Any advice on how to do so?
>> 
>> I'd like to setup build of symbolizer as a static library with no external dependencies except libc. 
>> Similar to https://github.com/google/sanitizers/blob/master/address-sanitizer/internal_symbolizer/howto <https://github.com/google/sanitizers/blob/master/address-sanitizer/internal_symbolizer/howto>.
>> Then the library can be linked into sanitized program and avoid dependency on standalone llvm-symbolizer tool.
>> 
>> Out solution uses LTO and internalize everything but symbolizer API, so we have no symbol conflicts with instrumented binary. 
>> For LTO we need zlib in source code.
> 
> This is not clear to me.
> 
> It seems that what you want ultimately is a build where zlib would be LTO together with your program?
> Assuming this is correct, you don’t need the source code for zlib, but you need a static archive of zlib build for LTO.
> (What may be missing, is the ability to the LLVM build system to select a static zlib archive to link to?)
> 
>> Mehdi
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160923/ab63bab3/attachment.html>


More information about the llvm-dev mailing list