Work towards more clean build rule include definitions.#10331
Open
hzeller wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
Open
Work towards more clean build rule include definitions.#10331hzeller wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
hzeller wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
Conversation
Many libraries have src/foo.h headers, but the places that include it only do the non-prefixed `#include "foo.h"`. So we need to provide the `includes = [ "src" ]` in the library. This worked accidentally in many places as there was probably already a `-Isrc` lingering around from other libs So even though bazel did not provide the path, the compiler found the header anyway. This works towards making each library and the files they provide self-contained. In one case, there was a header missing from the list of header; added them. Signed-off-by: Henner Zeller <h.zeller@acm.org>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates several Bazel build files across multiple modules to improve header resolution and target configuration. Key changes include adding or updating includes paths in the cts, dbSta, dst, est, and odb modules, marking test-related targets as testonly in dst, and correcting an include path in KDTree.cpp. I have no feedback to provide as there were no review comments.
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
maliberty
reviewed
May 4, 2026
| ], | ||
| includes = [ | ||
| "include", | ||
| "src", |
Member
There was a problem hiding this comment.
This should be visibility = ["//visibility:private"],
Collaborator
Author
There was a problem hiding this comment.
Dosn't work, //:openroad_lib is linking it.
ERROR: /home/hzeller/src/my/OpenROAD/BUILD.bazel:215:11: in cc_library rule //:openroad_lib: Visibility error:
target '//src/dbSta:dbSdcNetwork' is not visible from
target '//:openroad_lib'
Recommendation: modify the visibility declaration if you think the dependency is legitimate. For more info see https://bazel.build/concepts/visibility
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.
Many libraries have src/foo.h headers, but the places that include it only do the non-prefixed
#include "foo.h". So we need to provide theincludes = [ "src" ]in the library.This worked accidentally in many places as there was probably already a
-Isrclingering around from other libs So even though bazel did not provide the path, the compiler found the header anyway. This works towards making each library and the files they provide self-contained.In one case, there was a header missing from the list of header; added them.