[LLVMdev] building LLVM a little quicker

Duraid Madina duraid at octopus.com.au
Wed May 11 02:38:46 PDT 2005


Oleg Smolsky wrote:
>>If you want to use LLVM in anger, I'd stick with 3.4 for now.
> 
> Yes, I'd like to, but debian's version segfaults on llvm.....

You might like to try the following:

1) get a recent binutils CVS snapshot e.g.:
http://strawberry.resnet.mtu.edu/pub/gcc/binutils/snapshots/binutils.tar.bz2
2) build it
3) get the GCC 3.4.3 release
4) configure it, being sure to add --with-as=/the/as/you/just/built and 
  --with-ld=/the/ld/you/just/built
5) use the resulting gcc/g++ to build LLVM

Doing this works fine on x86 and ia64, and using the recent binutils 
will cut your LLVM build time by 20% if you're doing a debug build.* If 
you're lazy like me and keep relinking large binaries because that's the 
easy thing to do, this can save you a fair bit of time.

Unfortunately, the really fast way to build LLVM is to avoid GCC/GNU 
binutils completely. It's been a while since I did it last, but on a 
4-way HP-UX system I could build LLVM in under 2 minutes. A comparable 
2-way Linux system, on the other hand, takes about 10 minutes. This 
probably has a lot to do with the architecture in question, though. I'd 
be curious to know what build times with MSVC are like.

	Duraid

P.S. For the GCC spies^Wgurus out there: At least on x86 and ia64, GCC 
often compiles C++ codes _quicker_ than other compilers, but this really 
doesn't seem to be the case with LLVM. Does anyone have any idea what it 
might be about LLVM that's tickling GCC the wrong way?




More information about the llvm-dev mailing list