Vitaly Buka via llvm-dev
2016-Sep-23 20:44 UTC
[llvm-dev] Commit zlib source code into to llvm repo
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 . 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160923/02415958/attachment.html>
Mehdi Amini via llvm-dev
2016-Sep-23 23:00 UTC
[llvm-dev] Commit zlib source code into to llvm repo
> On Sep 23, 2016, at 1:44 PM, Vitaly Buka via llvm-dev <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/0f3b421e/attachment.html>
Vitaly Buka via llvm-dev
2016-Sep-23 23:35 UTC
[llvm-dev] Commit zlib source code into to llvm repo
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> wrote:> > On Sep 23, 2016, at 1:44 PM, Vitaly Buka via llvm-dev < > 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 > . > 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/012a0bc3/attachment.html>
Chris Lattner via llvm-dev
2016-Sep-25 19:48 UTC
[llvm-dev] Commit zlib source code into to llvm repo
> On Sep 23, 2016, at 10:44 AM, Vitaly Buka via llvm-dev <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?Are you asking whether it is possible to add it to your local repository, or to the mainline llvm.org <http://llvm.org/> distribution? In the case of the former, it just requires cmake hacking. For the later, we’d need to have extreme justification of why it is absolutely necessary. It isn’t a goal of llvm to include all dependencies out of the box, and each one we pick up introduces new complexities. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160925/3f0fc4f7/attachment.html>
Vitaly Buka via llvm-dev
2016-Sep-26 17:59 UTC
[llvm-dev] Commit zlib source code into to llvm repo
I was asking about the former, and You've answered my question. Thanks. On Sun, Sep 25, 2016 at 12:48 PM Chris Lattner <clattner at apple.com> wrote: On Sep 23, 2016, at 10:44 AM, Vitaly Buka via llvm-dev < 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? Are you asking whether it is possible to add it to your local repository, or to the mainline llvm.org distribution? In the case of the former, it just requires cmake hacking. For the later, we’d need to have extreme justification of why it is absolutely necessary. It isn’t a goal of llvm to include all dependencies out of the box, and each one we pick up introduces new complexities. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160926/24b7218c/attachment.html>