[cfe-dev] how to build clang only

Eli Friedman eli.friedman at gmail.com
Fri May 22 18:35:08 PDT 2009


2009/5/22 wtjcn <wtjcn at 163.com>:
> llvm is too big, I only need clang.
> "clang-only" is in makefile , but I  don't know how to use it.

The clang front-end (clang-cc) pulls in essentially all of LLVM; if
you're willing to give up code generation, though, I suppose you could
ifdef that out and modify the makefiles to skip building llvm/lib and
llvm/tools/clang/lib/Frontend/Backend.cpp.

> the same question for "make update", how to only update clang?

You can usually just run "svn update" in llvm/tools/clang.  You can
also run "make" in llvm/tools/clang to rebuild clang without
rebuilding all of LLVM.

-Eli




More information about the cfe-dev mailing list