<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Vitaly,<div class=""><br class=""></div><div class="">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).<div class="">That’d help to understand the need dump an external library source code directly inside LLVM.</div><div class=""><div class=""><br class=""></div><div class="">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=….) </div><div class=""><br class=""></div><div class="">— </div><div class="">Mehdi</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 23, 2016, at 4:35 PM, Vitaly Buka <<a href="mailto:vitalybuka@google.com" class="">vitalybuka@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Yes, zlib build for LTO will work, but user will have to build this lib from zlib source code anyway.</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Sep 23, 2016 at 4:01 PM Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" class="">mehdi.amini@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Sep 23, 2016, at 1:44 PM, Vitaly Buka via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="gmail_msg m_-163904877724336964Apple-interchange-newline"><div class="gmail_msg"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">Hi all,</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Is it possible to add zlib source code into llvm repo? Any advice on how to do so?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I'd like to setup build of symbolizer as a static library with no external dependencies except libc. </div><div class="gmail_msg">Similar to <a href="https://github.com/google/sanitizers/blob/master/address-sanitizer/internal_symbolizer/howto" class="gmail_msg m_-163904877724336964cremed" target="_blank">https://github.com/google/sanitizers/blob/master/address-sanitizer/internal_symbolizer/howto</a>.</div><div class="gmail_msg">Then the library can be linked into sanitized program and avoid dependency on standalone llvm-symbolizer tool.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Out solution uses LTO and internalize everything but symbolizer API, so we have no symbol conflicts with instrumented binary. <br class="gmail_msg"></div><div class="gmail_msg">For LTO we need zlib in source code.</div></div></div></blockquote></div><br class="gmail_msg"></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg">This is not clear to me.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">It seems that what you want ultimately is a build where zlib would be LTO together with your program?</div><div class="gmail_msg">Assuming this is correct, you don’t need the source code for zlib, but you need a static archive of zlib build for LTO.</div><div class="gmail_msg">(What may be missing, is the ability to the LLVM build system to select a static zlib archive to link to?)</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">— </div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg">Mehdi</div><div class="gmail_msg"><br class="gmail_msg"></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></div></div></body></html>