Building clang tools outside the clang source repo

Hello,

Is it possible to build clang tools outside the clang source repository? I would like to be able to work on my tool without having to checkout and build the entire llvm+clang, but I'm having difficulties to figure out which libraries to link with.

/Jesper

Hi Jesper,

it's possible very much. :wink: There is a binary called `llvm-config`. It
is installed target when you install LLVM. You can ask it for the
compiler/linker flags. Clang does not have anything similar to it, but
you might not need them. Since includes/defines are shared. Only the
libraries you will miss, but that depends what you do: For plugins,
shall not link against any Clang/LLVM library. For standalone
executable, you link what provides the symbols. :slight_smile:

Regards,
Laszlo