[LLVMdev] compiling clang with a obj/ dir

Bill Wendling isanbard at gmail.com
Sat Jul 14 22:36:47 PDT 2007


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



More information about the llvm-dev mailing list