Skip to content

dpl: factor shared internal headers into private hdrs target#10426

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

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

Conversation

@maliberty
Copy link
Copy Markdown
Member

Summary

Move the six headers that were duplicated across :dpl and :ui srcs in src/dpl/BUILD (DplObserver.h, Coordinates.h, Grid.h, Objects.h, architecture.h, network.h) into a new :dpl_private_hdrs cc_library with //visibility:private. Both :dpl and :ui now depend on it, so the headers are owned in one place and unreachable from outside //src/dpl.

Type of Change

  • Refactoring

Impact

Build-system only; no behavior change. Removes header duplication across two targets in the same package while preserving layering_check semantics and keeping the headers package-private.

Verification

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

Related Issues

None.

@maliberty maliberty requested a review from a team as a code owner May 14, 2026 06:13
@maliberty maliberty requested a review from gudeh May 14, 2026 06:13
@maliberty maliberty self-assigned this May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

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/dpl/BUILD file by extracting several private header files into a new cc_library target named dpl_private_hdrs. This target is then added as a dependency to both the dpl and ui libraries, eliminating the need to list these headers individually in their respective source lists. Feedback suggests that the new dpl_private_hdrs target is missing necessary dependencies (such as odb, utl, and Boost) and include paths required for the headers to be self-contained and compliant with layering_check.

Comment thread src/dpl/BUILD
Move the six headers that were duplicated across :dpl and :ui srcs
(DplObserver.h, Coordinates.h, Grid.h, Objects.h, architecture.h,
network.h) into a new :dpl_private_hdrs cc_library with
//visibility:private, so they're owned in one place and unreachable
from outside //src/dpl.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@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