The-OpenROAD-Project / The-OpenROAD-Project/OpenROAD
bazel: Multiple targets using the same source or exporting the same header.
Nobody has claimed this yet.
- Dominant language
- Verilog
- Stars
- 3.1k
- Forks
- 1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 136
Description
In general, there should only be exactly one library for each source and header. Otherwise it is not possible to exactly decide which library to use when including a header (#10408 , now set to draft, was suffering from such ambiguity)
(There might be situation where it is almost ok; for instance we have currently an overlap of headers for the three different gui builds; but these, also, should be unified.)
The following headers and sources show up in multiple libraries (for now, I excluded the gui libs)
First column: the source file that shows up in multiple libraries. Afterwards are all the libraries that are affected. To manually inspect while fixing, it is useful to use the bant print function and give it all the targets.
For the first line for instance, one could print both affected targets in one go; we can use the 'grep' function to highlight the header for quick visual navigation:
$(etc/get-bant-path.sh) print -e //src/cts //src/cts:private_hdrs -g '["/]Clock.h"'
and it becomes apparent that the Clock.h is exported in hdrs=[...] in the //src/cts:private_hdrs library, but also shows up in the srcs=[...] of //src/cts. So it needs to be removed from the //src/cts/
In the example from #10408 the header include/mpl/rtl_mp.h shows up as exported from mpl but is also mentioned in the srcs=[] of //src/mpl:ui
Anyway, here is the list to burn down:
src/cts/src/Clock.h //src/cts //src/cts:private_hdrs
src/dbSta/include/db_sta/IpChecker.hh //src/dbSta:IpChecker //src/dbSta:ui
src/dft/include/dft/Dft.hh //src/dft //src/dft:ui
src/dpl/src/graphics/DplObserver.h //src/dpl //src/dpl:ui
src/dpl/src/infrastructure/Coordinates.h //src/dpl //src/dpl:ui
src/dpl/src/infrastructure/Grid.h //src/dpl //src/dpl:ui
src/dpl/src/infrastructure/Objects.h //src/dpl //src/dpl:ui
src/dpl/src/infrastructure/architecture.h //src/dpl //src/dpl:ui
src/dpl/src/infrastructure/network.h //src/dpl //src/dpl:ui
src/drt/include/drt/TritonRoute.h //src/drt //src/drt:ui
src/drt/src/AbstractGraphicsFactory.h //src/drt //src/drt:ui
src/drt/src/distributed/drUpdate.h //src/drt //src/drt:ui
src/drt/src/dr/AbstractDRGraphics.h //src/drt //src/drt:ui
src/drt/src/dr/FlexDR.h //src/drt //src/drt:ui
src/drt/src/dr/FlexGridGraph.h //src/drt //src/drt:ui
src/drt/src/dr/FlexWavefront.h //src/drt //src/drt:ui
src/drt/src/frDesign.h //src/drt //src/drt:ui
src/drt/src/frRegionQuery.h //src/drt //src/drt:ui
src/drt/src/gc/FlexGC.h //src/drt //src/drt:ui
src/drt/src/global.h //src/drt //src/drt:ui
src/drt/src/pa/AbstractPAGraphics.h //src/drt //src/drt:ui
src/drt/src/pa/FlexPA.h //src/drt //src/drt:ui
src/drt/src/pa/FlexPA_unique.h //src/drt //src/drt:ui
src/drt/src/ta/AbstractTAGraphics.h //src/drt //src/drt:ui
src/drt/src/ta/FlexTA.h //src/drt //src/drt:ui
src/dst/include/dst/Distributed.h //src/dst //src/dst:ui
src/exa/src/observer.h //src/exa //src/exa:ui
src/grt/src/AbstractGrouteRenderer.h //src/grt //src/grt:ui
src/grt/src/AbstractRoutingCongestionDataSource.h //src/grt //src/grt:ui
src/grt/src/Net.h //src/grt //src/grt:ui
src/grt/src/Pin.h //src/grt //src/grt:ui
src/ifp/include/ifp/InitFloorplan.hh //src/ifp //src/ifp:ui
src/mpl/include/mpl/rtl_mp.h //src/mpl //src/mpl:ui
src/mpl/src/MplObserver.h //src/mpl //src/mpl:ui
src/mpl/src/clusterEngine.h //src/mpl //src/mpl:ui
src/mpl/src/mpl-util.h //src/mpl //src/mpl:ui
src/mpl/src/object.h //src/mpl //src/mpl:ui
src/mpl/src/shapes.h //src/mpl //src/mpl:ui
src/odb/include/odb/3dblox.h //src/odb //src/odb/src/3dblox
src/odb/include/odb/cdl.h //src/odb //src/odb/src/cdl
src/odb/include/odb/db.h //src/odb //src/odb/src/db
src/odb/include/odb/dbBlockCallBackObj.h //src/odb //src/odb/src/db
src/odb/include/odb/dbBlockSet.h //src/odb //src/odb/src/db
src/odb/include/odb/dbCCSegSet.h //src/odb //src/odb/src/db
src/odb/include/odb/dbChipCallBackObj.h //src/odb //src/odb/src/db
src/odb/include/odb/dbDatabaseObserver.h //src/odb //src/odb/src/db
src/odb/include/odb/dbExtControl.h //src/odb //src/odb/src/db
src/odb/include/odb/dbId.h //src/odb //src/odb/src/db
src/odb/include/odb/dbIterator.h //src/odb //src/odb/src/db
src/odb/include/odb/dbMap.h //src/odb //src/odb/src/db
src/odb/include/odb/dbMatrix.h //src/odb //src/odb/src/db
src/odb/include/odb/dbNetSet.h //src/odb //src/odb/src/db
src/odb/include/odb/dbObject.h //src/odb //src/odb/src/db
src/odb/include/odb/dbSet.h //src/odb //src/odb/src/db
src/odb/include/odb/dbShape.h //src/odb //src/odb/src/db
src/odb/include/odb/dbStream.h //src/odb //src/odb/src/db
src/odb/include/odb/dbTransform.h //src/odb //src/odb/src/db
src/odb/include/odb/dbTypes.h //src/odb //src/odb/src/db
src/odb/include/odb/dbUtil.h //src/odb //src/odb/src/db
src/odb/include/odb/dbViaParams.h //src/odb //src/odb/src/db
src/odb/include/odb/dbWireCodec.h //src/odb //src/odb/src/db
src/odb/include/odb/dbWireGraph.h //src/odb //src/odb/src/db
src/odb/include/odb/defin.h //src/odb //src/odb/src/defin
src/odb/include/odb/defout.h //src/odb //src/odb/src/defout
src/odb/include/odb/gdsUtil.h //src/odb //src/odb/src/gdsin
src/odb/include/odb/gdsin.h //src/odb //src/odb/src/gdsin
src/odb/include/odb/gdsout.h //src/odb //src/odb/src/gdsout
src/odb/include/odb/geom.h //src/odb //src/odb/src/db //src/odb/src/swig:ui
src/odb/include/odb/geom_boost.h //src/odb //src/odb/src/db
src/odb/include/odb/isotropy.h //src/odb //src/odb/src/db
src/odb/include/odb/lefin.h //src/odb //src/odb/src/lefin
src/odb/include/odb/lefout.h //src/odb //src/odb/src/lefout
src/odb/include/odb/odbDList.h //src/odb //src/odb/src/db
src/odb/include/odb/poly_decomp.h //src/odb //src/odb/src/db
src/odb/include/odb/unfoldedModel.h //src/odb //src/odb/src/db
src/odb/include/odb/util.h //src/odb //src/odb/src/db
src/odb/include/odb/wOrder.h //src/odb //src/odb/src/db
src/odb/src/def/def/defiAlias.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiAssertion.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiBlockage.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiComponent.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiDebug.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiDefs.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiFPC.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiFill.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiGroup.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiIOTiming.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiKRDefs.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiMisc.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiNet.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiNonDefault.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiPartition.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiPath.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiPinCap.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiPinProp.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiProp.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiPropType.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiRegion.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiRowTrack.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiScanchain.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiSite.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiSlot.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiTimingDisable.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiUser.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiUtil.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defiVia.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defrCallBacks.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defrData.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defrReader.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defrSettings.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defwWriter.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/def/def/defwWriterCalls.hpp //src/odb/src/def //src/odb/src/def:def_bison_lib
src/odb/src/swig/common/swig_common.h //src/odb/src/swig:swig_common //src/odb/src/swig:ui
src/rsz/src/BufferedNet.hh //src/rsz //src/rsz:ui
src/rsz/src/ResizerObserver.hh //src/rsz //src/rsz:ui
src/tap/include/tap/tapcell.h //src/tap //src/tap:ui
src/upf/include/upf/upf.h //src/upf //src/upf:ui
src/utl/src/LoggerCommon.cpp //src/utl:_utl.so //src/utl:ui
src/utl/src/LoggerCommon.h //src/utl:_utl.so //src/utl:ui
To get the quick bant print line from above, one can quickly transform them with:
(while read src targets ; do echo "\$(etc/get-bant-path.sh) print -e -g '[\"/]$(basename ${src})\"' ${targets}"; done) < list-from-above.txt
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the listed source/header and target pairs, using the provided bant print command to inspect each target's srcs and hdrs entries. Work through the list while checking the surrounding Bazel definitions and preserve any explicitly noted GUI exceptions. Done means each source or header is owned by exactly one library and the affected builds still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100