This is an alternative approach to r337727 which broke the build
because libc++ headers were copied into the location outside of
directories used by Clang. This change sets LIBCXX_HEADER_DIR to
different values depending on whether libc++ is being built as
part of LLVM w/ per-target multiarch runtime, LLVM or standalone.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This fixes our local waterfall build failure. Thank you! I'm not very familiar with CMake, so I'll wait for someone to take a look and approve.
LGTM. FWIW, I'm really not a huge fan of all these different ways of building libc++. There should be one canonical way of doing it, and it should be simple. However, it seems like this patch is the right thing to do given the changes that have already been made to account for specific use cases.
IOW, I don't like this whole trend, but we're already down that road.
Testing this on my system (Mac OS 10.13.6, using system libc++abi), I get a lot of files in my build's include/c++/v1 folder. Previously, there were two (__cxxabi_config.h and ccxxabi.h).
Now there are 131 files - all the libc++ header files.
Why?
The cmake command I use is: CXX=$LLVM_BIN/clang++ cmake -DLLVM_PATH=$LLVM/llvm -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_CXX_ABI_INCLUDE_PATHS=/usr/include $LIBCXX
phosek updated this revision to Diff 157043.
This fixes the problem with copying all the include files.
This *also* fixes my broken build (that was broken by r337630 wanting to copy cxxabi.h to /include/c++/v1/).
LG for my configuration.