[cherry-pick][swift/release/5.9] [test] Fix LLDB tests with just-built libcxx when using a target directory #6901
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 usualinclude/c++/v1
directory, but__config_site
exists ininclude/$TRIPLE/c++/v1
. Likewise, the libc++.so binary exists inlib/$TRIPLE/
, notlib/
(where LLDB libraries reside).This also adds the just-built-libcxx functionality to the lldb-dotest tool.
The
LIBCXX_
cmake config is borrowed fromlibcxx/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.Reviewed By: JDevlieghere, fdeazeve
Differential Revision: https://reviews.llvm.org/D133973
(cherry picked from commit cb0eb9d) (cherry picked from commit a9b4595baca074fa8dd6c9f3a2cd6edd6c5e2ffc)