compiling clang with a obj/ dir

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

compiling clang with a obj/ dir

Holger Schurig-2
I can compile LLVM using with this method:

svn co ...
cd llvm
./configure ...
make

or with that one:

svn co ...
mkdir obj
cd obj
../llvm/configure ...
make


How does the second method work with the new, experimental C
compiler, "clang" ?  The doc said that you put the clang sourcecode
into llvm/tools/clang, change into this directory and simply
enter "make". This seems to be not possible with the second method, at
least not in a way that separates sources and binaries.
_______________________________________________
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: compiling clang with a obj/ dir

Chris Lattner
On Sat, 14 Jul 2007, Holger Schurig wrote:

> I can compile LLVM using with this method:
>
> svn co ...
> cd llvm
> ./configure ...
> make
>
> or with that one:
>
> svn co ...
> mkdir obj
> cd obj
> ../llvm/configure ...
> make
>
>
> How does the second method work with the new, experimental C
> compiler, "clang" ?  The doc said that you put the clang sourcecode
> into llvm/tools/clang, change into this directory and simply
> enter "make". This seems to be not possible with the second method, at
> least not in a way that separates sources and binaries.

It should work, but I've never tried it.  I'm a srcdir=objdir kind of
person :).

One thing to try: after checking out clang into tools, add clang to the
llvm/tools/Makefile line.  Then do a 'make' in your tools objdir.  It
should just make the directories in the objdir and build like normal.

-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
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: compiling clang with a obj/ dir

Bill Wendling
On Jul 14, 2007, at 12:39 PM, Chris Lattner wrote:

> On Sat, 14 Jul 2007, Holger Schurig wrote:
>> I can compile LLVM using with this method:
>>
>> svn co ...
>> cd llvm
>> ./configure ...
>> make
>>
>> or with that one:
>>
>> svn co ...
>> mkdir obj
>> cd obj
>> ../llvm/configure ...
>> make
>>
>>
>> How does the second method work with the new, experimental C
>> compiler, "clang" ?  The doc said that you put the clang sourcecode
>> into llvm/tools/clang, change into this directory and simply
>> enter "make". This seems to be not possible with the second  
>> method, at
>> least not in a way that separates sources and binaries.
>
> It should work, but I've never tried it.  I'm a srcdir=objdir kind of
> person :).

srcdir != objdir is the One True Way! :-)

> One thing to try: after checking out clang into tools, add clang to  
> the
> llvm/tools/Makefile line.  Then do a 'make' in your tools objdir.  It
> should just make the directories in the objdir and build like normal.

I put my clang source tree in llvm/projects and it does just fine  
(doing a "make" from the top directory).

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