[LLVMdev] Practical --enable-shared LLVM builds.

Dan Villiom Podlaski Christiansen danchr at gmail.com
Thu Nov 13 13:09:02 PST 2008


On 13 Nov 2008, at 07:05, Nick Lewycky wrote:

> Óscar Fuentes wrote:
>> It seems that --enable-shared builds are not used by LLVM developers
>> because the executables starts slowly. I guess this is related to the
>> number of symbols the dynamic linker has to resolve. If we could  
>> reduce
>> the symbols exported to those which are required, maybe the startup  
>> time
>> would become bearable.
>
> I think that premise needs to be retested. I don't doubt that we  
> have a
> very large number of symbols, but I wouldn't be so sure that it still
> results in a large load time on modern hardware.

A very quick testing on RHEL 5.1 using LLVM GCC resulted in ‘make  
check’ taking 0:48 minutes in a static build, and 2:28 minutes shared.  
I wouldn't consider my setup representative of anything, though, so I  
suggest people try it out themselves :)

Attached below is a very rough patch which touches pretty much the  
entire build system. It also includes an attempt to allow LLVM itself  
to be compiled with LTO, and a modification to AutoRegen.sh to allow  
forcing a regeneration, but they aren't strictly related to it.

The configuration I used was:
> ./configure --enable-optimized --enable-shared --disable-static -- 
> disable-bindings --disable-doxygen --enable-targets=x86,cbe,cpp  
> CC=llvm-gcc CXX=llvm-g++

I seriously doubt the patch is ready for inclusion, but it's better  
than nothing ;)

--

Dan Villiom Podlaski Christiansen, stud. scient.
danchr at gmail.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-shared.diff
Type: application/octet-stream
Size: 36081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081113/a7089aef/attachment.obj>


More information about the llvm-dev mailing list