[PATCH] [CMake] Introduce libLLVM.so as LLVM_ENABLE_SHARED

Tobias Grosser tobias at grosser.es
Tue Mar 4 09:42:59 PST 2014

On 03/04/2014 06:06 PM, NAKAMURA Takumi wrote:
> Hi chandlerc,
> Note, this includes; http://llvm-reviews.chandlerc.com/D2941

Why do you include this? The patch in general looks unnecessary big. Is 
there a need to keep all this together? Some changes like the one above) 
are really cleanups, that could be committed ahead of time. This would 
make the actual patch review easier.

> **Why using OBJLIB?**
> - --whole-archive is available only for GNU ld. Rather, I chose linking whole OBJLIBs.
> - No need to create *.a(s). Archive files may be created in parallel.
> **Why introducing DEPENDS instead of add_dependencies?**
> - add_dependencies(target) works only for the target. Implicitly generated obj.LLVM*** are required to add deps to generated files.
> **Why llvm-tblgen and clang-tblgen are tweaked?**
> - They should be built out of LINK_COMPONENTS with -static.
> - I think -ffunction-sections would not make sense for the big libLLVM.so.

Out of interest, what is the motivation for introducing a libLLVM.so? I 
currently use BUILD_SHARED_LIBS=ON to avoid long link times in my 
incremental development builds. I assume this is not the motivation for 
libLLVM.so? Would BUILD_SHARED_LIBS still work after this patch?


More information about the llvm-commits mailing list