[cfe-dev] Building clang outside of LLVM (with CMake)
gvenn.cfe.dev at gmail.com
Wed Feb 2 05:43:48 PST 2011
Don't you also need tblgen given that it is used to generate code/classes for clang?
If correct the problem here being that tblgen is a non-library found under utils vs lib.
On Feb 2, 2011, at 7:15, David Chisnall wrote:
> On 2 Feb 2011, at 11:40, arrowdodger wrote:
>> On Wed, Feb 2, 2011 at 6:29 AM, Óscar Fuentes <ofv at wanadoo.es> 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.
>> I just was about to propose this myself.
> This would be useful. In particular, projects that are not using clang as a compiler want to build just the libraries required for libclang, which only depend on a few LLVM libraries (Support and System, and possibly the asm parser things if you want inline asm).
>>> IIRC Doug mentioned something about build times, and indeed clang takes
>>> about 4 minutes to build alone and almost 10 minutes to build within
>>> LLVM, so if the goal is to quickly build clang multiple times with the
>>> same LLVM base then it is a must-have feature.
>> I'm not sure, but if someone wish to only recompile clang, can't he do
>> cd cmake_build_dir/tools/clang && make?
> You can also just do cd llvm/tools/clang && gmake - this works without the CMAKE stuff. If you're hacking on clang, then this is a lot faster than doing a complete LLVM build each time. There's no requirement to do an LLVM build for every clang build, unless the LLVM ABI has changed since your last build (and this rarely happens more than once in any given hour...).
> In fact, it would be better if clang used the installed LLVM headers, rather than the ones from the LLVM tree, so that you'd always be building clang with the headers that matched the library.
> This email complies with ISO 3103
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev