[cfe-dev] Building clang on Mavericks with libc++....
Jean-Daniel Dupas
devlists at shadowlab.org
Sat Nov 9 13:24:37 PST 2013
Le 9 nov. 2013 à 20:02, Fons Rademakers <Fons.Rademakers at cern.ch> a écrit :
> 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 (livcxx) 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))
>
It is expected. The copy of the headers is driven by a Makefile in llvm/tools/clang/runtime/libcxx/
It only copies the headers during the install step and does not try to rebuild the libc++ binary.
> 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
-- Jean-Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131109/080778ee/attachment.html>
More information about the cfe-dev
mailing list