Carsten Mattner via llvm-dev
2016-Dec-27 13:29 UTC
[llvm-dev] Bootstrapping with in-tree libcxx
When I tried to build with -DLLVM_ENABLE_LIBCXX, I found out that it doesn't try to use the in-tree libcxx but looks for one built and installed in the system. Since building all of llvm required CXX and using libcxx with the same version as the rest of llvm makes sense, I would certainly appreciate an option to build the in-tree libcxx as a first step and use it in when building llvm, lld, lldb, clang, ... Since llvm already builds many other DSOs it needs at runtime, adding libcxx is reasonable. More so if we consider that not all systems package libcxx at the same version as clang and llvm. For instance, Arch Linux has libcxx 3.8.0 but llvm and clang 3.9.0.
Asiri Rathnayake via llvm-dev
2016-Dec-27 14:38 UTC
[llvm-dev] Bootstrapping with in-tree libcxx
On Tue, Dec 27, 2016 at 1:29 PM, Carsten Mattner via llvm-dev < llvm-dev at lists.llvm.org> wrote:> When I tried to build with -DLLVM_ENABLE_LIBCXX, I found out that > it doesn't try to use the in-tree libcxx but looks for one built and > installed > in the system. >IIRC, -DLLVM_ENABLE_LIBCXX reduces to passing --stdlib=libc++ (see [1]) to the compiler. 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. Cheers, / Asiri [1] http://libcxx.llvm.org/docs/UsingLibcxx.html> > Since building all of llvm required CXX and using libcxx with the same > version as the rest of llvm makes sense, I would certainly appreciate > an option to build the in-tree libcxx as a first step and use it in when > building llvm, lld, lldb, clang, ... > > Since llvm already builds many other DSOs it needs at runtime, adding > libcxx is reasonable. More so if we consider that not all systems package > libcxx at the same version as clang and llvm. For instance, Arch Linux > has libcxx 3.8.0 but llvm and clang 3.9.0. > _______________________________________________ > 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/20161227/cf1066d9/attachment.html>
Carsten Mattner via llvm-dev
2016-Dec-27 14:45 UTC
[llvm-dev] Bootstrapping with in-tree libcxx
On Tue, Dec 27, 2016 at 3:38 PM, Asiri Rathnayake <asiri.rathnayake at gmail.com> wrote:> > > On Tue, Dec 27, 2016 at 1:29 PM, Carsten Mattner via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> >> When I tried to build with -DLLVM_ENABLE_LIBCXX, I found out that >> it doesn't try to use the in-tree libcxx but looks for one built >> and installed in the system. > > > IIRC, -DLLVM_ENABLE_LIBCXX reduces to passing --stdlib=libc++ (see > [1]) to the compiler. > > 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.Yes please, that would be helpful as an interim workaround.