[PATCH] D18174: Fix libcxx build on musl

Ben Craig via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 15 13:52:44 PDT 2016


bcraig added a comment.

In http://reviews.llvm.org/D18174#375813, @raj.khem wrote:

> I think my problem was that while compiling libcxxabi, it wants to peek into libcxx headers but then libcxxabi cmake infra doesnt have the musl support like libcxx. So Now I solved it by adding -D_LIBCPP_HAS_MUSL_LIBC to CXXFLAGS.


When cross-compiling, I have found it to be best to build libcxx and libcxxabi as sub-projects of LLVM (i.e. I place libcxx under llvm/projects/libcxx).  I can then configure libcxxabi and libcxx at once.  When I get around to building, I specifically dodge building LLVM and/or clang by running "make cxxabi cxx".

If you go with that approach, I think all of the _LIBCPP_HAS_MUSL_LIBC stuff gets worked out, because libcxxabi looks at the __ config header that #includes __config_site.


http://reviews.llvm.org/D18174





More information about the cfe-commits mailing list