In certain configurations, libc++ headers all exist in the same directory, and libc++ binaries exist in the same directory as lldb libs. When LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is enabled (*and* the host is not Apple, which is why I assume this wasn't caught by others?), this is not the case: most headers will exist in the usual include/c++/v1 directory, but __config_site exists in include/$TRIPLE/c++/v1. Likewise, the libc++.so binary exists in lib/$TRIPLE/, not lib/ (where LLDB libraries reside).
This also adds the just-built-libcxx functionality to the lldb-dotest tool.
The LIBCXX_ cmake config is borrowed from libcxx/CMakeLists.txt. I could not figure out a way to share the cmake config; ideally we would reuse the same config instead of copy/paste.
Isn't this always going to return true? (same for is_configured (libcxx_include_target_dir)).
is_configured returns the empty string when the CMake variables are empty, and the empty string converts to True