I checked out branch 15.0.3 of llvm, and configured the build as such:
cmake -G "Unix Makefiles" -S llvm -B build -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_INSTALL_PREFIX=/home/me/local -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind"
I then compiled and installed clang and the runtimes with:
make -C build install
make -C build runtimes
make -C build install-runtimes
I do find clang, lld, etc. in the the directory specified by CMAKE_INSTALL_PREFIX, but no libc++ there. It was built, though, as I can find it in the build directory:
% find . -name libc++.so
...
./build/runtimes/runtimes-bins/lib/x86_64-unknown-linux-gnu/libc++.so
./build/lib/x86_64-unknown-linux-gnu/libc++.so
Similarly all the headers are in build/runtimes/runtimes-bins/include/c++/v1.
But I would expect all of these to be installed in the CMAKE_INSTALL_PREFIX directory, just like clang, etc.
What’s the trick?