Set up shared library targets.#2573
Merged
Merged
Conversation
Databean
reviewed
May 15, 2026
48047e3 to
c0fc73b
Compare
Databean
approved these changes
May 18, 2026
3405691582
added a commit
to 3405691582/android-cuttlefish
that referenced
this pull request
May 18, 2026
In google#2573 we set up some new targets to build shared libraries. This commit migrates all binary targets with dependencies on //cuttlefish/result, //libbase, //cuttlefish/common/libs/fs:fs, and //cuttlefish/common/utils:files to use the shared library targets instead.
3405691582
added a commit
to 3405691582/android-cuttlefish
that referenced
this pull request
May 18, 2026
In google#2573 we set up some new targets to build shared libraries. This commit migrates all binary targets with dependencies on //cuttlefish/result, //libbase, //cuttlefish/common/libs/fs:fs, and //cuttlefish/common/utils:files to use the shared library targets instead.
Here we create Bazel cc_shared_library targets for the result, libbase, files, and fs libraries. These were determined to have the most usages across all targets. Since these libraries have external dependencies, they must be resolved by dynamic linkage as well. This necessitates creating some targets to facilitate this. We put this at top level rather than creating new directory structure, since we might want to adjust how this looks. We also do the needful to ensure these libraries are packaged. This will incur a slight bit of bloat, but we'll perform the migration soon enough that this should be temporary and possibly not even noticed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Here we create Bazel cc_shared_library targets for the result, libbase, files, and fs libraries. These were determined to have the most usages across all targets.
Since these libraries have external dependencies, they must be resolved by dynamic linkage as well. This necessitates creating some targets to facilitate this. We put this at top level rather than creating new directory structure, since we might want to adjust how this looks.
We also do the needful to ensure these libraries are packaged. This will incur a slight bit of bloat, but we'll perform the migration soon enough that this should be temporary and possibly not even noticed.