[cfe-dev] use Clang's API in llvm project
Chad Colgur
colgur at gmail.com
Tue Nov 16 17:29:24 PST 2010
Hi,
I have a similar question except am a little further along than Neng.
My github project (https://github.com/colgur/gaius) follows the llvm
project template. There is a problem linking with clang libraries in
this configuration. If we assign USEDLIBS (as the clang/examples do)
then make detects a dependency issue (the exact failure is on another
machine but I can provide the log if need be).
I've also tried overriding LIBS with the clang libraries but in this
case the link step fails with unresolved llvm symbols in clang
libraries.
The only way I have found to successfully link with clang is to
re-order the '-l' options such that clang libraries appear before
llvm. I only tried this because I noticed that
'clang/examples/clang-interpreter' does the same thing. It seems that
llvm has special treatment for USEDLIBS on the link line.
Thanks for any suggestions,
Chad
More information about the cfe-dev
mailing list