[cfe-dev] Questions about libc++ for linux and its git repository (if any)

Jean-Daniel Dupas devlists at shadowlab.org
Thu Jul 19 01:32:09 PDT 2012


Le 19 juil. 2012 à 08:30, salvatore benedetto <salvatore.benedetto at gmail.com> a écrit :

> On Wed, Jul 18, 2012 at 10:39 PM, Jean-Daniel Dupas
> <devlists at shadowlab.org> wrote:
>> 
>> Le 18 juil. 2012 à 22:01, salvatore benedetto <salvatore.benedetto at gmail.com> a écrit :
>> 
>>> Hi there,
>>> 
>>> I just started using llvm and clang so forgive me for this
>>> very simple question.
>>> 
>>> I'm looking for a git repository for the libcxx (the libcxx.llvm.org
>>> website only list svn) and also looking for some info about the
>>> current Linux support.
>> 
>> 
>> I don't know what other projects (apart llvm and clang) are available here, but libcxx can be found at  http://llvm.org/git/libcxx.git and compiler-rt at http://llvm.org/git/compiler-rt.git
>> 
> 
> Perfect thanks! May I suggest to have that listed in the project page?
> 
> Anyway what about the Linux support? Where do I start from?
> 
> I wanted to start using it for a project of mine (clang++ & libcxx) in
> C++11, and even though
> I'm not a C++ guru, some part of the STL should still be usable right?
> As long as I pass my own
> allocator to a container for instance, I should have not problem using
> it (exception and memory allocation
> excluded).
> 
> How do I tell clang++ where to look for libcxx (excluded the obvious
> -I option)? Any readings you can point me
> too?
> 

If you checkout the libcxx project in the llvm sources (in projects/libcxx) and build/install clang using autoconf, the headers will automatically be installed where clang++ driver expects them.

You can also install them manually in "<prefix>/lib/c++ /v1".

When invoking clang++, don't forget to pass "-stdlib=libc++" to tell clang you want to use libc++.

I never tried to use it on Linux, so I can't tell where clang look for the libc++ binary when it invoke the linker. You may have to copy it in a standard path (/usr/lib or /usr/local/lib). 

-- Jean-Daniel








More information about the cfe-dev mailing list