Skip to content

[libc++] Add a CI job for the LLDB data formatters #65174

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

Closed
wants to merge 3 commits into from

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Sep 1, 2023

This patch adds a CI job running the LLDB data formatters in the libc++ CI. This should avoid breaking the LLDB data formatters when e.g. the layout of libc++ data structures is changed.

This was originally opened as https://reviews.llvm.org/D133621.

This patch adds a CI job running the LLDB data formatters in the libc++
CI. This should avoid breaking the LLDB data formatters when e.g. the
layout of libc++ data structures is changed.

This was originally opened as https://reviews.llvm.org/D133621.
@ldionne ldionne added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. lldb labels Sep 1, 2023
@ldionne ldionne self-assigned this Sep 1, 2023
@ldionne
Copy link
Member Author

ldionne commented Sep 1, 2023

Note that this still needs some work. I am cleaning up my review queue from Phabricator.

@ravikandhadai
Copy link

This is an awesome improvement!

-DLLVM_ENABLE_PROJECTS='llvm;clang;lldb' \
-DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi'

${NINJA} -C "${BUILD_DIR}" check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this require building Clang?

If so, I don't think we can add this as a pre-commit check.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we already build clang in the bootstrap build I think it makes sense to test it in that CI job. Or at least share the build artifacts of the bootstrap build and reuse it. This is similar what the clang CI does.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that would build clang. Agree with @mordante , re-using the already built clang on the machine is what we do for our LLDB CI too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link to what you folks do there? Do you simply avoid adding clang to LLVM_ENABLE_PROJECTS? It's easy for me to upload the just-built Clang artifacts to Buildkite but I am not sure what I should do to reuse them from the LLDB build.

Copy link
Member

@Michael137 Michael137 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using a "standalone" build of LLDB would make sense here? Correct me if I'm wrong @adrian-prantl @JDevlieghere
Here is how we configure it for the standalone bot: https://github.com/llvm/llvm-zorg/blob/3ecc17d4b9a6fc6e81d5d2265a4e4088267bd800/zorg/jenkins/monorepo_build.py#L632-L692

So if we have a clang build already, we can just point the LLDB build to those artifacts as follows:

                 '-DLLVM_DIR={}'.format(llvm_dir),
                 '-DClang_DIR={}'.format(clang_dir),

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant was to reuse the build of clang in our bootstrapping build.

@Michael137
Copy link
Member

Any idea what's left to do here?

@ldionne
Copy link
Member Author

ldionne commented Oct 12, 2023

Any idea what's left to do here?

It looks like according to https://buildkite.com/llvm-project/libcxx-ci/builds/29381#018a5138-767f-4472-9fcb-c20da396c5c2, we are missing PythonAndSwig from the Docker image.

Could NOT find PythonAndSwig (missing: Python3_LIBRARIES
-- Python3_INCLUDE_DIRS LLDB_ENABLE_SWIG)

How do you generally install it? I could update our Docker image with it.

@ldionne ldionne requested a review from a team as a code owner October 12, 2023 23:50
@mordante mordante assigned mordante and unassigned ldionne Feb 13, 2024
@mordante
Copy link
Member

As discussed with @ldionne I'll pick this up. At the moment the work is blocked by some maintenance work on the CI.

@mordante
Copy link
Member

I've created a new patch (#88312) for this feature, using the direction I suggested.

@ldionne
Copy link
Member Author

ldionne commented Apr 15, 2024

Dropping in favour of #88312 , thanks a lot Mark!

@ldionne ldionne closed this Apr 15, 2024
@ldionne ldionne deleted the review/lldb-data-formatters-ci branch April 15, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. lldb
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants