Skip to content

mpl: factor shared internal headers into private hdrs target#10428

Open
maliberty wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:mpl-private-hdrs
Open

mpl: factor shared internal headers into private hdrs target#10428
maliberty wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:mpl-private-hdrs

Conversation

@maliberty
Copy link
Copy Markdown
Member

Summary

  • Move the two headers duplicated across :mpl and :ui srcs in src/mpl/BUILD (MplObserver.h, clusterEngine.h) into a new :mpl_private_hdrs cc_library with //visibility:private.
  • The new target declares its own direct deps (:pusher, //src/odb/src/db) so it's self-contained rather than relying on every consumer to redeclare them.
  • Drop the redundant include/mpl/rtl_mp.h entry from :ui srcs (already exposed via :mpl's hdrs).

Type of Change

  • Refactoring

Impact

Build-system only; no behavior change. Header duplication across two targets in the same package is eliminated while preserving layering_check semantics, and the private hdrs are unreachable from outside //src/mpl.

Verification

  • I have verified that the local build succeeds (bazel build //src/mpl:mpl //src/mpl:ui //src/mpl:mpl_private_hdrs).
  • My code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

Related Issues

None.

Move the two headers that were duplicated across :mpl and :ui srcs in
src/mpl/BUILD (MplObserver.h, clusterEngine.h) into a new
:mpl_private_hdrs cc_library with //visibility:private, so they're
owned in one place and unreachable from outside //src/mpl. The new
target declares its own deps (:pusher, //src/odb/src/db) to be
self-contained. Also drop the redundant include/mpl/rtl_mp.h entry
from :ui srcs (already exposed via :mpl's hdrs).

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@maliberty maliberty requested a review from a team as a code owner May 14, 2026 07:11
@maliberty maliberty self-assigned this May 14, 2026
@maliberty maliberty requested a review from AcKoucher May 14, 2026 07:11
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the src/mpl/BUILD file by introducing a new cc_library target, mpl_private_hdrs, to manage shared private headers MplObserver.h and clusterEngine.h. These files were removed from the source lists of the mpl and ui libraries and are now included via dependencies, improving the build structure. I have no feedback to provide.

@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant