Skip to content

[bazel] Rework liblldb #91549

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

Merged
merged 2 commits into from
May 9, 2024
Merged

[bazel] Rework liblldb #91549

merged 2 commits into from
May 9, 2024

Conversation

keith
Copy link
Member

@keith keith commented May 9, 2024

Previously we were linking liblldb as a shared library, but also linking the contents into the lldb binary. This is invalid and results in subtle runtime issues because of duplicate constants, like the global plugin registry. This now links the dylib to lldb directly. This requires we switch to cc_binary instead because cc_shared_library expects your library to export all symbols in your transitive dependency tree, where we only want to export lldb symbols.

Previously we were linking liblldb as a shared library, but also linking
the contents into the lldb binary. This is invalid and results in subtle
runtime issues because of duplicate constants, like the global plugin
registry. This now links the dylib to lldb directly. This requires we
switch to cc_binary instead because cc_shared_library expects your
library to export all symbols in your transitive dependency tree,
where we only want to export lldb symbols.
@keith keith requested a review from aaronmondal May 9, 2024 01:29
@keith keith requested a review from rupprecht as a code owner May 9, 2024 01:29
@llvmbot llvmbot added the bazel "Peripheral" support tier build system: utils/bazel label May 9, 2024
Copy link
Member

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

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

Generally LTGM. Would probably be a good idea to add some comments as this is a bit more on the "not something you see everyday" side.

@keith keith merged commit d36b4ab into llvm:main May 9, 2024
@keith keith deleted the ks/bazel-rework-liblldb branch May 9, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bazel "Peripheral" support tier build system: utils/bazel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants