[cfe-dev] Compilation benchmark: bzip2

Sanghyeon Seo sanxiyn at gmail.com
Sun Dec 23 16:24:40 PST 2007


2007/12/24, Chris Lattner <clattner at apple.com>:
> There is a bigger question though: do we want to link more and more
> llvm libraries into clang at this point?  In addition to the bitcode
> writer, you'd eventually want the codegen and target libraries as
> well.  The bigger issue with this is that it increases link times of
> clang and most people aren't using it right now.

I'd like to point out that bitcode writer was already linked with
clang (I suppose for use with AST serialization) and my patch didn't
increase link time at all.

> For now, if you want the bcwriter, I'd say go ahead and add it.  If
> you want the target libraries though, I'd suggest building them
> together into a single "backend" dylib/so file that is loaded by
> clang.  That way we can rebuild clang without relinking all the llvm
> pieces.

How do I do that? :)

By the way, my idea was to have a wrapper script that behaves like
gcc, which calls clang -emit-bc for gcc -c and llvm-ld -native for gcc
linking.

What is the difference between running opt on individual bitcode files
and running llvm-ld -O2 over all bitcode files?

-- 
Seo Sanghyeon



More information about the cfe-dev mailing list