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

Óscar Fuentes ofv at wanadoo.es
Wed Feb 2 16:58:28 PST 2011


Douglas Gregor <dgregor at apple.com> writes:

>> 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
>> configure?
>
> You know, now that you mention it.... yeah, that would probably be
> better. Thanks, Eric!

IMO it is perfectly fine to use the config.h header generated for
LLVM. Else we are duplicating a big chunk of code. Sharing as much
infrastructure with LLVM as posible reduces maintenance and ensures up
to some point that Clang operates the same regardless how you build it.

Apart from that, Eric, please note that we are talking about a
CMake-only feature. Unless you plan to change the LLVM build system (the
traditional one) for implementing it there is no gain at all for the
users on duplicating the platform tests inside the Clang tree.



More information about the cfe-dev mailing list