[cfe-dev] building clang outside the LLVM source tree

Y Giridhar Appaji Nag giridhar at appaji.net
Sat May 23 08:06:49 PDT 2009


On 09/05/23 16:33 +0200, Sebastian Redl said ...
> Y Giridhar Appaji Nag wrote:
> > - Is it possible to build clang outside the LLVM source tree?  i.e. I have a
> >
> > - To do the above, do I have to craft my own build system?  I poked around and
> 
> If you have an LLVM source tree, it should be possible to put Clang into
>  
> If you don't, it *should* be possible to build Clang by copying
> Makefile.common and Makefile.rules to its directory, and generating an
> appropriate Makefile.config, then setting LEVEL to the current
> directory. Aside from all the things defined in the normal config, it
> would also have to set the paths to the compiled tools.
> 
> But I'm not 100% sure if that will work.

I was actually trying this, and had to modify the Makefile.config (generated
when LLVM was built) quite a bit, so I was wondering if this is the intended
way to go about it.

In any case, sounds like it is safe to assume that instructions on
http://llvm.org/docs/Projects.html mostly concern projects that are built when
the LLVM source tree is also available.

> > In a situation like this, I would've ideally created a clang-lib package also
> > with shared libraries.  But I intend to do that only when clang is released
> > officially.  Please do let me know if this sounds reasonable.
> >   
> Sounds reasonable to me. I personally have no idea how to create shared
> Clang libraries, though.

I was assuming --enable-shared in LLVM ./configure would enable this, I might
be wrong.

Cheers,

Giridhar

-- 
Y Giridhar Appaji Nag | http://appaji.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090523/5ef0893c/attachment.sig>


More information about the cfe-dev mailing list