writing transforms newbie question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

writing transforms newbie question

Ryan M. Lefever
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:

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

The same thing happens if I try to set LEVEL to something like
../../../usr/software/llvm.

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?

Regards,
Ryan

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: writing transforms newbie question

Simon Burton
On Fri, 14 Apr 2006 00:21:19 -0500
"Ryan M. Lefever" <[hidden email]> wrote:

>
> 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?

I use the llvm-config utility with g++, eg.

g++ myfile.o `llvm-config --ldflags` `llvm-config --libs` -lpthread -ldl -o mytest

Simon.

--
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: writing transforms newbie question

Reid Spencer
In reply to this post by Ryan M. Lefever
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:

http://llvm.org/docs/MakefileGuide.html

> 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.

Reid.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

signature.asc (196 bytes) Download Attachment