[llvm-dev] Building clang and llvm

Chris Bieneman via llvm-dev llvm-dev at lists.llvm.org
Tue Jul 31 16:26:28 PDT 2018


Hi Praveen,

When configuring your LLVM & Clang build you can set the CMAKE_CXX_COMPILER and CMAKE_C_COMPILER options on your CMake command line. To use libc++, you can set LLVM_ENABLE_LIBCXX=On during configuration time.

If you haven’t already, I suggest you look over the documentation of LLVM’s build system here:
http://www.llvm.org/docs/CMake.html <http://www.llvm.org/docs/CMake.html>

It lists many commonly used options and gives a basic explanation of how to use CMake.

-Chris

> On Jul 29, 2018, at 8:08 AM, Praveen Velliengiri via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hello all
> I'm new to clang and llvm. Yesterday I built the newest version of clang and llvm (version 7.0). But today I came to know clang uses -libstdc++ as a default c++ standard library. Unfortunately, my gcc is 5.4.0, so clang still points to the old libstdc++ which doesn't support some features of c++17. Is there any way to build clang and llvm based on already pre-installed clang,llvm and make it use libc++ by default? 
> There was one solution I came across the internet but it suggests me to update the gcc to the newest version, so that clang can use the newest version of libstdc++ and I can make use of c++17 features. But I don't want to update gcc. I would like to have a solution with clang and llvm. Any answers or suggestions are highly appreciated.
> Thanks
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180731/3a0b11ec/attachment.html>


More information about the llvm-dev mailing list