On 9/2/06, Chris Lattner <sabre at nondot.org> wrote:> > Make sure to add it to Codegen/LinkAllCodegenComponents.h.I'm sure I did. I did so from the first time and I also needed to add my library .a file to the USEDLIBS variable within llc makefile to build llc. I wonder how lli links with all the rest LLVM as it seems to include no lib within its makefile. May be I need to include/link my lib somewhere else? Thanks, Tony. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060902/f09535e4/attachment.html>
On Sat, 2 Sep 2006, Anton Vayvod wrote:> I'm sure I did. I did so from the first time and I also needed to add my > library .a file to the USEDLIBS variable within llc makefile to build llc. > I wonder how lli links with all the rest LLVM as it seems to include no lib > within its makefile. May be I need to include/link my lib somewhere else?Ah, that's probably it. Try adding your lib to the JIT_LIBS variable in llvm/Makefile.rules. -Chris -- http://nondot.org/sabre/ http://llvm.org/
Hi! Everything worked fine, thanks! Though now I've updated LLVM from CVS and both llc and lli can't link with my library. Checked via "make VERBOSE=1" that all libraries listed in USEDLIBS variable are linked except mine. My library is built successfully and situated in LLVMOBJROOT/Debug/libs directory among the others. It doesn't have LLVM prefix though. I noticed that LINK_COMPONENTS variable added to the llc and lli makefiles. I tried to reread the documentation about LLVM makefile system but it didn't help to solve my problem. I have the following makefile: LEVEL = ../../.. LIBRARYNAME = RegAlloc BUILD_ARCHIVE = 1 DONT_BUILD_RELINKED = 1 include $(LEVEL)/Makefile.common I've included my library dir within PARALLEL_DIRS of CodeGen makefile. My createRegisterAllocator function is declared in Passes.h and called in LinkAllCodeGenComponents.cpp The name of my library is listed in USEDLIBS variable of llc makefile and JIT_LIBS of llvm/Makefile.rules (in order to link with lli). I tried both with "a" extension and without it. Any help would be appreciated. Thanks. Tony. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060905/82ef923b/attachment.html>