Instead of using the raw generated StaConfig, provide it via a library. - #395
Open
hzeller wants to merge 1 commit into
Open
Instead of using the raw generated StaConfig, provide it via a library.#395hzeller wants to merge 1 commit into
hzeller wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the Bazel build configuration by introducing a new "config" cc_library target to wrap the StaConfig header, replacing direct references to ":StaConfig" across other targets. Feedback on the changes highlights a Bazel anti-pattern in the new "config" target, where referencing the generated header file path directly instead of using the generating rule's label (":StaConfig") can lead to build race conditions.
The StaConfig.hh is often included as bare file without the fully qualified path. If we provide it in a library, we can provide the `includes=[]` for the header to be found. (of course, we ideally want the proper fully qualified path, but that takes a while until we're there). Signed-off-by: Henner Zeller <h.zeller@acm.org>
hzeller
force-pushed
the
feature-20260727-config-lib
branch
from
July 27, 2026 16:06
44a9957 to
d08d03f
Compare
Contributor
Author
|
Once the submodule is updated in OpenROAD, we can have the following patch in OR: --- a/src/dbSta/BUILD
+++ b/src/dbSta/BUILD
@@ -137,7 +137,6 @@ cc_library(
"src/MakeDbSta.cc",
":swig",
":tcl",
- "//src/sta:StaConfig",
],
hdrs = [
"include/db_sta/MakeDbSta.hh",
@@ -150,6 +149,7 @@ cc_library(
"src",
],
deps = [
+ "//src/sta:config",
":IpChecker",
":dbNetwork",
":dbSta", |
Contributor
Author
|
Looks like the CI just was hosed |
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.
The StaConfig.hh is often included as bare file without the fully qualified path.
If we provide it in a library, we can provide the
includes=[]for the header to be found.(of course, we ideally want the proper fully qualified path, but that takes a while until we're there).