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

salvatore benedetto salvatore.benedetto at gmail.com
Thu Jul 19 01:45:23 PDT 2012


On Thu, Jul 19, 2012 at 10:32 AM, Jean-Daniel Dupas
<devlists at shadowlab.org> wrote:
> 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.
>

OK, re-running configure gives me the following in config.log

configure:3508: WARNING: Unknown project (libcxx) won't be configured
automatically

which doesn't look very good. I pulled libcxx into projects.

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

OK, how do I build and configure it outside llvm? The project page
doesn't say much,
except for running builtit.

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

OK perfect.

Thanks,
Salvatore




More information about the cfe-dev mailing list