[cfe-dev] Building clang on Mavericks with libc++....

Rafael Espíndola rafael.espindola at gmail.com
Sat Nov 9 12:02:07 PST 2013


It looks like the headers are only copied during make install, so you
have to install clang to be able to use the libcxx headers.

On 9 November 2013 11:02, Fons Rademakers <Fons.Rademakers at cern.ch> wrote:
> Hi Jean-Daniel,
>
>  thanks for the reply. However, it seems putting the libcxx
> <llvmsource>/projects/ does not work, as shown in config.log:
>
> configure:3639: WARNING: Unknown project (libcxx) won't be configured
> automatically
> configure:3680: checking build system type
>
> and even in projects/Makefile it says:
>
> # Don't build libcxx, it isn't designed to be built directly.
> DIRS := $(filter-out libcxx,$(DIRS))
>
> so what is the best approach to inject:
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/
>
> as search directory to self compiled clang?
>
>
> Cheers, Fons.
>
>
>
> On 09/11/2013 10:20, Jean-Daniel Dupas wrote:
>>
>> Le 9 nov. 2013 à 01:00, Fons Rademakers <Fons.Rademakers at cern.ch> a écrit
>> :
>>
>>> Hi,
>>>
>>> when compiling clang (todays trunk) from source on Mavericks, which ships
>>> with libc++ in:
>>>
>>>
>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/
>>>
>>> and for LLVM configured like this:
>>>
>>> $ /Users/rdm/root/interpreter/llvm/src/configure
>>> --prefix=/Users/rdm/root/interpreter/llvm/inst --disable-docs
>>> --disable-bindings --disable-visibility-inlines-hidden --enable-libcpp
>>> --disable-optimized --enable-targets=host --with-extra-options= CC=clang
>>> CXX=clang++ CFLAGS=-m64 CXXFLAGS=-m64
>>>
>>> but that does not seem to be enough as the built clang++ does look for
>>> libc++ in:
>>>
>>>>>> so what config option should I specify to get clang++ to use the one and
>>> only copy of libc++, namely the one in:
>>>
>>>
>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/
>>>
>>> Should configure not take the libc++ location from the specified CXX
>>> compiler? Which indeed is:
>>>
>>>>>>
>>> Any suggestions welcome.
>>>
>>>
>>> Cheers, Fons.
>>
>>
>> Since Xcode 5 (or Maverick, I'm not sure), libc++ headers are no longer
>> part of the system, but part of the toolchain.
>>
>> So Maverick does not ships with C++ header, clang in Xcode does (and it
>> know where to look for its own libc++ headers). If you are using your own
>> clang build, you have to provide libc++ headers yourself.
>>
>> Actually, this is easy as it is done automatically by the build system if
>> libcxx is checked out in <llvm source>/projects/
>>
>> For the record, libcxx can be checked out using :
>>
>> svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
>>
>> -- Jean-Daniel
>>
>>
>>
>>
>
> --
> Org:    CERN, European Laboratory for Particle Physics.
> Mail:   1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers at cern.ch              Phone: +41 22 7679248
> WWW:    http://fons.rademakers.org           Fax:   +41 22 7669640
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>




More information about the cfe-dev mailing list