[cfe-users] libcxx.llvm.org linux build instructions unclear

Marshall Clow mclow.lists at gmail.com
Wed Jul 9 08:42:08 PDT 2014


I would be happy to commit better instructions to the web site (aka
“patches welcome”)

This is how I build libc++ with cmake (on Mac OS, not Linux)

LLVM_BUILD  is a directory where my builds go
LIBCXX is where libc++ is checked out

# Set up cmake build

cd $LLVM_BUILD
rm -rf libcxx-cmake-build ; mkdir libcxx-cmake-build ; cd
libcxx-cmake-build
TRIPLE=-apple- CXX=$LLVM_BIN/clang++ CXX=$LLVM_BIN/clang++ cmake
-DCMAKE_BUILD_TYPE=Release $LIBCXX

# build libcxx with CMake
cd $LLVM_BUILD/libcxx-cmake-build
make -j 4



On Tue, Jul 8, 2014 at 10:23 PM, Ben Pope <benpope81 at gmail.com> wrote:

> On Wednesday, July 09, 2014 02:48 AM, Larry Evans wrote:
>
>> The instructions on:
>>    http://libcxx.llvm.org/
>> say:
>>     We can now run CMake:
>>
>>      CC=clang CXX=clang++ cmake -G "Unix Makefiles"
>> -DLIBCXX_CXX_ABI=libstdc++
>> -DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="/usr/include/c++/4.7/;/
>> usr/include/c++/4.7/x86_64-linux-gnu/"
>> -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr <libc++-source-dir>
>>
>> however, it does not say what to put for <libc++-source-dir>
>> or in which directory this command is to be run.  One might
>> guess this command is to be run inb the directory where the buildit
>> script is located, because that's what the earlier instructions
>> (for Mac OS) were run from; however, that's not at all clear.
>>
>
> CMake encourages out of source build.
>
> You run CMake in your build directory and you point it to your source
> diectory (the one with CMakeLists.txt).
>
> E.g.:
>
> /libcxx_build
> /libcxx
>    /include
>    CMakeLists.txt
>
> cd /libcxx/build
> CMake ../libcxx
>
> Or:
> /libcxx
>    /build
>    /include
>    CMakeLists.txt
>
> cd /libcxx/build
> CMake ..
>
> Ben
>
>
> _______________________________________________
> cfe-users mailing list
> cfe-users at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20140709/42ed3141/attachment.html>


More information about the cfe-users mailing list