[LLVMdev] writing transforms newbie question

Reid Spencer reid at x10sys.com
Thu Apr 13 23:38:22 PDT 2006

On Fri, 2006-04-14 at 00:21 -0500, Ryan M. Lefever wrote:
> Hi,
> I apologize if this is a duplicate question; I didn't see it previously 
> on the list.  I'm using llvm 1.6 and my setup is as follows.  LLVM is 
> installed at /usr/software/llvm and the cfrontend is installed at 
> /usr/software/cfrontend.
> If I cd to /usr/software/llvm/lib/Transforms/Hello and compile the Hello 
> transform I have no problems.  However, if I copy the Hello directory to 
> my home directory and change the makefile so the LEVEL points to 
> /usr/software/llvm I get the following error message:

I assume you did something like:
LEVEL = /usr/software/llvm

If so, you can't do that. :)  The LEVEL must be a relative path from the
local directory and it must also be the case that it is a subdirectory
of LLVM tree. 

I think what you want is an LLVM makefile project.  Please take a look
at the "sample" project (llvm/projects/sample) and also:


> Makefile:15: /Makefile.common: No such file or directory
> make: *** No rule to make target `/Makefile.common'.  Stop.

Its trying to find the LLVM Makefile.common file but not succeeding
because of the way it uses the LEVEL variable.
> The same thing happens if I try to set LEVEL to something like 
> ../../../usr/software/llvm.

That, however, I would expect to work. Not sure why it doesn't. What
happens if you do this?

> Do I need my transform in the LLVM lib/Transforms directory to build it? 
>   Are there other variables I need to set in the makefile?

Please see the Makefile Guide. You can set your own project up using the
LLVM Makefile system.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060413/8478e577/attachment.sig>

More information about the llvm-dev mailing list