Skip to content

[cherry-pick][swift/release/5.9] [test] Fix LLDB tests with just-built libcxx when using a target directory #6901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Michael137
Copy link

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.

Reviewed By: JDevlieghere, fdeazeve

Differential Revision: https://reviews.llvm.org/D133973

(cherry picked from commit cb0eb9d) (cherry picked from commit a9b4595baca074fa8dd6c9f3a2cd6edd6c5e2ffc)

…ctory.

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.

Reviewed By: JDevlieghere, fdeazeve

Differential Revision: https://reviews.llvm.org/D133973

(cherry picked from commit cb0eb9d)
(cherry picked from commit a9b4595baca074fa8dd6c9f3a2cd6edd6c5e2ffc)
@Michael137 Michael137 changed the title [test] Fix LLDB tests with just-built libcxx when using a target directory [cherry-pick][swift/release/5.9] [test] Fix LLDB tests with just-built libcxx when using a target directory May 20, 2023
@Michael137 Michael137 requested a review from adrian-prantl May 20, 2023 11:04
@Michael137
Copy link
Author

@swift-ci test

@Michael137 Michael137 closed this May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants