[LLVMdev] why doesn't LLVM link its dependencies dynamically?

Yale Zhang yzhang1985 at gmail.com
Tue Oct 7 10:46:43 PDT 2008


OK. I've tried using shared libraries for everything except LLVMX86.o, and
the build time improvement isn't as good as I hoped for. On a Dell Precision
390 workstation, the time to rebuild after a one line change in a library is
10 s for static linking and 7.3 s for dynamic linking (building in Eclipse
is slower).

One advantage of static linking I haven't thought about is that only the
needed functions need to be loaded, unlike everything for dynamic libraries.
The space saving is huge though: 1350MiB vs 723MiB and the IO load is
probably greatly reduced.

I've added a hackish script that patches LLVM 2.3 to use dynamic libraries
if anyone wants it. Just run it after configuring.

On Tue, Oct 7, 2008 at 10:50 AM, Gordon Henriksen <gordonhenriksen at me.com>wrote:

> On Oct 6, 2008, at 15:52, Yale Zhang wrote:
>
> > Hi everyone. I'm mainly build the debug versions of lli and opt
> > which are huge and take up to 10 seconds to build. It seems there is
> > no option in configure to allow dynamic linking. Before I try to add
> > it myself, is there a reason why it's not done?
>
> In addition to the APIs being insufficiently stable for shared
> libraries to be of much use per se, it invoked pathologically bad
> performance in some dynamic link editors--startup times greatly
> exceeding your link times.
>
> — Gordon
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081007/6dfe4b6d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make_llvm_use_shared_libs
Type: application/octet-stream
Size: 1075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081007/6dfe4b6d/attachment.obj>


More information about the llvm-dev mailing list