<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Praveen,<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">If you haven’t already, I suggest you look over the documentation of LLVM’s build system here:</div><div class=""><a href="http://www.llvm.org/docs/CMake.html" class="">http://www.llvm.org/docs/CMake.html</a></div><div class=""><br class=""></div><div class="">It lists many commonly used options and gives a basic explanation of how to use CMake.</div><div class=""><br class=""></div><div class="">-Chris</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 29, 2018, at 8:08 AM, Praveen Velliengiri via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="">Hello all<br class=""></div>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? <br class=""></div>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.<br class=""></div><div class="">Thanks<br class=""></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>