[cfe-dev] Building clang outside of LLVM (with CMake)

Douglas Gregor dgregor at apple.com
Wed Feb 2 09:24:14 PST 2011

On Feb 1, 2011, at 7:29 PM, Óscar Fuentes wrote:

> Some time ago Doug mentioned that it would be useful to build clang
> outside of LLVM: basically LLVM acts as an external library which is
> used by clang.
> Just to be sure that I'm working on the right track, what's the
> motivation for this requirement?

We'd like to be able to consider LLVM as a stable library that Clang depends on. This would allow us to build against an installed LLVM (rather than embedding our own full copy of LLVM in Clang), test Clang and LLVM more independently, avoid embedding all of LLVM into the Clang executable (assuming that LLVM becomes a shared library at some point), and make our Xcode/MSVC projects significantly smaller (since they'll only have Clang).

I think this will also become more important in the future, since, for example, LLDB layers on top of LLVM and Clang.

	- Doug

More information about the cfe-dev mailing list