[LLVMdev] Correct Way to Build an LLVM Pass

Arnamoy Bhattacharyya arnamoy at ualberta.ca
Wed Jul 4 14:27:50 PDT 2012


Hi;

I wrote an LLVM transformation pass and I put my code inside the
llvm-src/lib/Transforms/my-pass directory.  I want to know what is the
correct method for compiling it and building my plugin for the pass.  After
reading the http://llvm.org/docs/WritingAnLLVMPass.html page, I felt that I
have to keep my pass inside the above said directory.  But when I run make
from inside my-pass directory but I am getting the errors -

../../../Makefile.common:60: ../../../Makefile.config: No such file or
directory
../../../Makefile.common:68: /Makefile.rules: No such file or directory
make: *** No rule to make target `/Makefile.rules'.  Stop.

Which kinds of makes sense as there is no Makefile.config in the llvm-src
directory.

So I tried to place my-pass directory inside the llvm-build/lib/Transforms
directory and run make from there.  But got the following error -

make: *** No rule to make target
`/home/arnie/llvm-development/llvm/lib/Transforms/LoopMem/Makefile', needed
by `Makefile'.  Stop.

However, if I configure and build the whole LLVM again (with my pass), it
is able to produce the shared library.  Is it the only way to integrate my
pass into LLVM?  Because, every time I modify my pass, I have to rebuilt
LLVM which takes close to half-an-hour to build?

Thank you;
-- 
Arnamoy Bhattacharyya
Athabasca Hall 143
Department of Computing Science - University of Alberta
Edmonton, Alberta, Canada, T6G 2E8
587-710-7073
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120704/f508dbe4/attachment.html>


More information about the llvm-dev mailing list