[cfe-dev] How to add and link new library to the existing clang libraries?
mahesha.llvm at gmail.com
Fri Sep 7 01:52:25 PDT 2012
Thanks Takumi and Umesh Kalappa for your reply. Yes, you right.
On Thu, Sep 6, 2012 at 8:33 PM, NAKAMURA Takumi <geek4civic at gmail.com>wrote:
> 2012/9/4 Mahesha HS <mahesha.llvm at gmail.com>:
> > I want to add and link a new library like libClangOmp.a to the existing
> > clang libraries like libClangLex.a/libClangLex.a/etc so that it finally
> > becomes a part of libclang.so. What is the basic procedure to do so?
> > Currently, I am getting 'undefined reference' linker error to a function
> > defined in libClangOmp.a and which is called from libClangLex.a. I must
> > missing something to mention in makefiles?
> You have to tweak clang/tools/*/Makefile(s).
> For example, tools/libclang/Makefile,
> USEDLIBS = clangARCMigrate.a clangRewriteCore.a clangRewriteFrontend.a \
> clangFrontend.a clangDriver.a \
> clangSerialization.a \
> clangParse.a clangSema.a clangEdit.a clangAnalysis.a \
> clangAST.a clangLex.a clangTooling.a clangBasic.a
> You may put your clangOmp.a after clangLex.a, as long as clangLex.a
> depends on your clangOmp.a.
> clangAST.a clangLex.a clangOmp.a clangTooling.a clangBasic.a
> It should be done for each tools/*/Makefile(s).
> Note, USELIBS is sensitive to linking order.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev