-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[bazel] Add support for building lldb #87589
Conversation
This adds build configuration for building LLDB on macOS and Linux. It uses a default subset of features that should work out of the box with macOS + Ubuntu. It is notably missing python support right now, although some of the scaffolding is there, because of the complexity of linking a python dylib, especially if you plan to distribute the resulting liblldb.so. Most of this build file is pretty simple, one of the unfortunate patterns I had to use was to split the header and sources cc_library targets to break circular dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow this looks pretty good!
The only concern I have is the -l*
in the linkopts
. I remember going to fairly great lengths to remove those for other third-party deps like zlib because they made the build susceptible to cache poisoning and had reproducibility issues. The deps used there are fairly complex, so I'm not sure how viable it is to add all of them as third-party deps. However, the bazel central registry seems to have at least some of them. Maybe we could borrow some build files from there.
thanks for the review! |
Hi Keith, the bazel buildkite is not happy with this change.
Is this something you can fix forward? |
IIUC, the The bazel buildkite setup is like:
Step1 lists some incompatible targets like |
Would it be safe to change that CI configuration to only do a |
I don't know the reason behind |
I landed bee3377 to make buildkite green. As for why we do query+test instead of just test: I think this comes from https://github.com/openxla/iree/blob/bb7e536ecd31ea24007aa7202f3a0c41b897e05c/build_tools/bazel/build_test_all.sh
While that may be true for iree, I don't think it's (currently) true for LLVM. i.e., I don't know if we have any Separate from the buildkite issue: we have some internal rules for building LLDB, and they look a bit different than this, but that's partly because it requires a bunch of other internal stuff. I'll see if there's anything we have that we can contribute. |
If the goal is to include manual targets, we can instead do:
and test those with |
This adds build configuration for building LLDB on macOS and Linux. It uses a default subset of features that should work out of the box with macOS + Ubuntu. It is notably missing python support right now, although some of the scaffolding is there, because of the complexity of linking a python dylib, especially if you plan to distribute the resulting liblldb.so.
Most of this build file is pretty simple, one of the unfortunate patterns I had to use was to split the header and sources cc_library targets to break circular dependencies.