expose libertybuilder for 3DIC support in dbsta#362
Conversation
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request adds the liberty/LibertyBuilder.hh header to the exported headers in the BUILD file to enable programmatic LibertyCell synthesis. The review feedback correctly identifies that several transitive dependencies required by this header are currently private, which will lead to compilation errors for external consumers. It is recommended to export the additional headers as suggested.
| # Needed by src/dbSta to synthesize LibertyCells programmatically. | ||
| "liberty/LibertyBuilder.hh", |
There was a problem hiding this comment.
The header liberty/LibertyBuilder.hh includes several other headers that are not currently exported in the hdrs list, such as MinMax.hh, Transition.hh, LibertyClass.hh, and ConcreteLibrary.hh.
Since these headers are located in the liberty/ directory and are currently private (only included in srcs via glob), any external consumer like dbSta that includes LibertyBuilder.hh will fail to compile because these transitive dependencies will not be found. Additionally, LibertyBuilder.hh uses types like LibertyCell, LibertyPort, and TimingArcSet whose definitions are in these private headers.
You should export these dependencies as well to make LibertyBuilder.hh usable by external components.
| # Needed by src/dbSta to synthesize LibertyCells programmatically. | |
| "liberty/LibertyBuilder.hh", | |
| # Needed by src/dbSta to synthesize LibertyCells programmatically. | |
| "liberty/LibertyBuilder.hh", | |
| "liberty/LibertyClass.hh", | |
| "liberty/Transition.hh", | |
| "liberty/MinMax.hh", | |
| "liberty/ConcreteLibrary.hh", |
There was a problem hiding this comment.
You are wrong.
- All four headers ARE already public, under src/sta/include/sta/:
- MinMax.hh, Transition.hh, LibertyClass.hh, ConcreteLibrary.hh. - They're already in hdrs via glob(["include/sta/*.hh"]) at line 350 — that glob picks all four up.
- include/sta is already in the propagated includes at line 388. Bazel propagates includes to every consumer of the OpenSTA library, so a bare #include "MinMax.hh" from LibertyBuilder.hh resolves to include/sta/MinMax.hh automatically — no layering violation.
The reason LibertyBuilder.hh uses bare names ("MinMax.hh") instead of "sta/MinMax.hh" is that OpenSTA's PRIVATE compile flags include -Iinclude/sta, AND Bazel publishes that same path to consumers via includes. Both internal and external compiles see those bare names resolve cleanly.
Added liberty/LibertyBuilder.hh to OpenSTA's public hdrs list in src/sta/BUILD. Same section already exports other private headers needed by SWIG; mine joins that block with a comment explaining why dbSta needs it.
Needed by dbSta for 3DIC support The-OpenROAD-Project/OpenROAD#10417