<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 27, 2016 at 1:29 PM, Carsten Mattner via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When I tried to build with -DLLVM_ENABLE_LIBCXX, I found out that<br>
it doesn't try to use the in-tree libcxx but looks for one built and installed<br>
in the system.<br></blockquote><div><br></div><div><div>IIRC, -DLLVM_ENABLE_LIBCXX reduces to passing --stdlib=libc++ (see [1]) to the compiler.</div><div><br></div><div>What you can do is a two-stage build. On the first stage, build just libc++ (ninja cxx cxxabi). On the second stage, re-configure with -DLLVM_ENABLE_LIBCXX and build the rest of the tools. We have a downstream builder that works this way to avoid a libstdc++ defect on the host platform. I can't remember the exact details, can dig them up if it helps.</div><div><br></div><div>Cheers,</div><div><br></div><div>/ Asiri</div><div><br></div><div>[1] <a href="http://libcxx.llvm.org/docs/UsingLibcxx.html">http://libcxx.llvm.org/docs/UsingLibcxx.html</a></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Since building all of llvm required CXX and using libcxx with the same<br>
version as the rest of llvm makes sense, I would certainly appreciate<br>
an option to build the in-tree libcxx as a first step and use it in when<br>
building llvm, lld, lldb, clang, ...<br>
<br>
Since llvm already builds many other DSOs it needs at runtime, adding<br>
libcxx is reasonable. More so if we consider that not all systems package<br>
libcxx at the same version as clang and llvm. For instance, Arch Linux<br>
has libcxx 3.8.0 but llvm and clang 3.9.0.<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div></div>