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

Eric Christopher echristo at apple.com
Wed Feb 2 16:28:11 PST 2011

On Feb 2, 2011, at 4:01 PM, Douglas Gregor wrote:

> On Feb 2, 2011, at 2:29 PM, Óscar Fuentes wrote:
>> Douglas Gregor <dgregor at apple.com> writes:
>>> 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,
>> [snip]
>> There are some configuration options (C_INCLUDE_DIRS,
>> CLANG_RESOURCE_DIR) which are stored on LLVM's config.h file.
>> The Right Thing is to create a config.h file for Clang, which is a task
>> a bit more obtrusive than I used to. It would consist on passing
>> -DHAVE_CLANG_CONFIG_H on the command line and adding
>> # include "clang/Config/config.h"
>> #endif
>> where necessary. This allows the autoconf build to remain unaffected.
> This sounds like the right approach.

Why not just have clang's config.h just be entirely separate from llvm? While
you may be duplicating a few things in a new configure.ac for clang it wouldn't
be a whole lot and then you could just (effectively) ./configure clang as
well and it'll just look for llvm on the system, otherwise just do a recursive

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110202/fc089b2b/attachment.html>

More information about the cfe-dev mailing list