Skip to content

Commit 908aeab

Browse files
committed
Improve Bazel BUILD files and a some new ones
Added BUILD files to dst fin ifp gpl mpl pad par ppl psm rcx tap upf Split modules into two libraries like in cmake. Compile the swig & tcl files in the module rather than at the top level. Signed-off-by: Matt Liberty <[email protected]>
1 parent 1b0c816 commit 908aeab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1521
-598
lines changed

BUILD.bazel

Lines changed: 27 additions & 311 deletions
Large diffs are not rendered by default.

MODULE.bazel

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,21 @@ bazel_dep(name = "boost.iostreams", version = BOOST_VERSION + ".bcr.2")
7373
bazel_dep(name = "boost.iterator", version = BOOST_VERSION)
7474
bazel_dep(name = "boost.json", version = BOOST_VERSION + ".bcr.2")
7575
bazel_dep(name = "boost.lambda", version = BOOST_VERSION + ".bcr.2")
76+
bazel_dep(name = "boost.lexical_cast", version = BOOST_VERSION)
7677
bazel_dep(name = "boost.multi_array", version = BOOST_VERSION + ".bcr.2")
7778
bazel_dep(name = "boost.optional", version = BOOST_VERSION)
7879
bazel_dep(name = "boost.phoenix", version = BOOST_VERSION)
7980
bazel_dep(name = "boost.polygon", version = BOOST_VERSION + ".bcr.2")
8081
bazel_dep(name = "boost.property_tree", version = BOOST_VERSION + ".bcr.2")
8182
bazel_dep(name = "boost.random", version = BOOST_VERSION + ".bcr.1")
83+
bazel_dep(name = "boost.range", version = BOOST_VERSION)
8284
bazel_dep(name = "boost.regex", version = BOOST_VERSION)
85+
bazel_dep(name = "boost.serialization", version = BOOST_VERSION)
86+
bazel_dep(name = "boost.smart_ptr", version = BOOST_VERSION)
8387
bazel_dep(name = "boost.spirit", version = BOOST_VERSION)
8488
bazel_dep(name = "boost.stacktrace", version = BOOST_VERSION)
85-
bazel_dep(name = "boost.thread", version = BOOST_VERSION)
89+
bazel_dep(name = "boost.system", version = BOOST_VERSION)
90+
bazel_dep(name = "boost.thread", version = BOOST_VERSION + ".bcr.2")
8691
bazel_dep(name = "boost.tokenizer", version = BOOST_VERSION)
8792
bazel_dep(name = "boost.unordered", version = BOOST_VERSION)
8893
bazel_dep(name = "boost.utility", version = BOOST_VERSION)

MODULE.bazel.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel/build_helper.bzl

Lines changed: 0 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -17,128 +17,36 @@ OPENROAD_BINARY_SRCS_WITHOUT_MAIN = [
1717
#Root OpenRoad
1818
":openroad_swig",
1919
":openroad_tcl",
20-
#Utility
21-
"//src/utl:swig",
22-
"//src/utl:tcl",
23-
#InitFp
24-
":init_floorplan_swig",
25-
":init_floorplan_tcl",
2620
#OpenDB
2721
"//src/odb:tcl",
2822
"//src/odb:swig",
29-
#UPF
30-
":upf_swig",
31-
":upf_tcl",
32-
#DbSTA
33-
"//src/dbSta:tcl",
34-
"//src/dbSta:swig",
35-
#ioPlacer
36-
":ioplacer_tcl",
37-
":ioplacer_swig",
38-
#Resizer
39-
"//src/rsz:swig",
40-
"//src/rsz:tcl",
41-
#OpenDP
42-
"//src/dpl:swig",
43-
"//src/dpl:tcl",
44-
#Example
45-
"//src/exa:swig",
46-
"//src/exa:tcl",
47-
#finale
48-
":finale_swig",
49-
":finale_tcl",
50-
#antenna_checker
51-
"//src/ant:swig",
52-
"//src/ant:tcl",
53-
#FastRoute
54-
"//src/grt:fastroute_swig",
55-
"//src/grt:fastroute_tcl",
56-
#Replace
57-
":replace_swig",
58-
":replace_tcl",
59-
#TritonCTS
60-
"//src/cts:tcl",
61-
"//src/cts:swig",
62-
#Tapcell
63-
":tapcell_swig",
64-
":tapcell_tcl",
65-
#OpenRCX
66-
":rcx_swig",
67-
":rcx_tcl",
6823
#TritonRoute
6924
":triton_route_swig",
7025
":triton_route_tcl",
71-
#PDNSim
72-
":pdn_sim_swig",
73-
":pdn_sim_tcl",
74-
#PartitionManager
75-
":partition_manager_swig",
76-
":partition_manager_tcl",
7726
#PDNGen
7827
":pdngen_tcl",
7928
":pdngen_swig",
80-
#MPL
81-
":mpl_swig",
82-
":mpl_tcl",
8329
#RMP
8430
":rmp_swig",
8531
":rmp_tcl",
86-
#STT
87-
"//src/stt:swig",
88-
"//src/stt:tcl",
89-
#Distributed
90-
":dst_swig",
91-
":dst_tcl",
92-
#Pad
93-
":pad_swig",
94-
":pad_tcl",
9532
#dft
9633
":dft_swig",
9734
":dft_tcl",
9835
]
9936

10037
OPENROAD_LIBRARY_HDRS_INCLUDE = [
101-
#InitFp
102-
"src/ifp/include/ifp/*.hh",
10338
#STA
10439
"src/sta/include/sta/*.hh",
105-
#ioPlacer
106-
"src/ppl/include/ppl/*.h",
107-
#finale
108-
"src/fin/include/fin/*.h",
109-
#TritonMP
110-
"src/mpl/include/mpl/*.h",
111-
#Replace
112-
"src/gpl/include/gpl/*.h",
113-
#Tapcell
114-
"src/tap/include/tap/*.h",
115-
#OpenRCX
116-
"src/rcx/include/rcx/*.h",
11740
#TritonRoute
11841
"src/drt/include/triton_route/*.h",
11942
"src/drt/src/db/infra/*.hpp",
120-
#PDNSim
121-
"src/psm/include/psm/*.h",
122-
"src/psm/include/psm/*.hh",
123-
#PartitionManager
124-
"src/par/src/*.h",
125-
"src/par/include/par/*.h",
12643
#PDNGen
12744
"src/pdn/include/pdn/*.hh",
128-
#MPL
129-
"src/mpl/include/mpl/*.h",
13045
#RMP
13146
"src/rmp/src/*.h",
13247
"src/rmp/include/rmp/*.h",
133-
#Distributed
134-
"src/dst/include/dst/*.h",
135-
#pad
136-
"src/pad/include/pad/*.h",
13748
#dft
13849
"src/dft/include/dft/*.hh",
139-
#upf
140-
"src/upf/include/upf/*.h",
141-
"src/upf/src/*.h",
14250
]
14351

14452
# Once we properly include headers relative to project-root,
@@ -153,60 +61,15 @@ OPENROAD_LIBRARY_INCLUDES = [
15361
#STA
15462
"src/sta",
15563
"src/sta/include/sta",
156-
#GUI
157-
"src/gui/include",
158-
#InitFp
159-
"src/ifp/include",
160-
#ioPlacer
161-
"src/ppl/include",
162-
"src/ppl/include/ppl",
163-
"src/ppl/src",
164-
#Resizer
165-
"src/rsz/include",
166-
"src/rsz/include/rsz",
167-
"src/rsz/src",
168-
#finale
169-
"src/fin/include",
170-
"src/fin/include/fin",
171-
#TritonMP
172-
"src/mpl/include",
173-
"src/mpl/include/mpl",
174-
#Replace
175-
"src/gpl/include/gpl",
176-
"src/gpl/include",
177-
#TritonCTS
178-
"src/cts/src",
179-
#Tapcell
180-
"src/tap/include/tap",
181-
"src/tap/include",
182-
#OpenRCX
183-
"src/rcx/include/rcx",
184-
"src/rcx/include",
18564
#TritonRoute
18665
"src/drt/include/triton_route",
18766
"src/drt/src",
18867
"src/drt/include",
189-
#PDNSim
190-
"src/psm/include/psm",
191-
"src/psm/include",
192-
#PartitionManager
193-
"src/par/include",
194-
"src/par/include/par",
19568
#PDNGen
19669
"src/pdn/include",
19770
"src/pdn/include/pdn",
198-
#MPL
199-
"src/mpl/include",
200-
"src/mpl/src",
20171
#RMP
20272
"src/rmp/include",
203-
#Distributed
204-
"src/dst/include",
205-
"src/dst/include/dst",
206-
#pad
207-
"src/pad/include",
208-
#utl
209-
"src/utl/src",
21073
#dft
21174
"src/dft/include",
21275
"src/dft/src/clock_domain",
@@ -216,8 +79,6 @@ OPENROAD_LIBRARY_INCLUDES = [
21679
"src/dft/src/replace",
21780
"src/dft/src/architect",
21881
"src/dft/src/stitch",
219-
#upf
220-
"src/upf/include",
22182
]
22283

22384
OPENROAD_LIBRARY_SRCS_EXCLUDE = [
@@ -229,25 +90,6 @@ OPENROAD_LIBRARY_SRCS_INCLUDE = [
22990
#Root OpenRoad
23091
"src/*.cc",
23192
"src/*.cpp",
232-
#Utility
233-
"src/utl/src/*.cpp",
234-
"src/utl/src/*.h",
235-
#InitFp
236-
"src/ifp/src/*.cc",
237-
#ioPlacer
238-
"src/ppl/src/*.cpp",
239-
"src/ppl/src/*.h",
240-
#finale
241-
"src/fin/src/*.cpp",
242-
"src/fin/src/*.h",
243-
#TritionMP
244-
"src/mpl/src/*.cpp",
245-
"src/mpl/src/*.h",
246-
#Replace
247-
"src/gpl/src/*.cpp",
248-
"src/gpl/src/*.h",
249-
#Tapcell
250-
"src/tap/src/*.cpp",
25193
#OpenRCX
25294
"src/rcx/src/*.cpp",
25395
"src/rcx/src/*.h",
@@ -257,30 +99,12 @@ OPENROAD_LIBRARY_SRCS_INCLUDE = [
25799
"src/drt/src/**/*.h",
258100
"src/drt/src/**/*.cpp",
259101
"src/drt/src/**/*.cc",
260-
#PDNSim
261-
"src/psm/src/*.cpp",
262-
"src/psm/src/*.h",
263-
#PartitionManager
264-
"src/par/src/*.cpp",
265102
#PDNGen
266103
"src/pdn/src/*.cc",
267104
"src/pdn/src/*.cpp",
268105
"src/pdn/src/*.h",
269-
#mpl
270-
"src/mpl/src/*.cpp",
271-
"src/mpl/src/*.h",
272106
#RMP
273107
"src/rmp/src/*.cpp",
274-
#Distributed
275-
"src/dst/src/*.cc",
276-
"src/dst/src/*.h",
277-
#pad
278-
"src/pad/src/*.cpp",
279-
"src/pad/src/*.h",
280-
#upf
281-
"src/upf/src/*.cpp",
282-
#utl
283-
"src/utl/*.h",
284108
#dft
285109
"src/dft/src/**/*.cpp",
286110
"src/dft/src/**/*.hh",

src/ant/BUILD

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,46 +17,49 @@ cc_library(
1717
)
1818

1919
cc_library(
20-
name = "make-antenna-checker",
20+
name = "lib",
2121
srcs = [
22-
"src/MakeAntennaChecker.cc",
22+
"src/AntennaChecker.cc",
23+
"src/PinType.hh",
24+
"src/Polygon.cc",
25+
"src/Polygon.hh",
2326
],
2427
hdrs = [
25-
"include/ant/MakeAntennaChecker.hh",
28+
"include/ant/AntennaChecker.hh",
29+
],
30+
includes = [
31+
"include",
2632
],
27-
includes = ["include"],
2833
deps = [
29-
":ant",
30-
"//:ord",
31-
"//src/grt:types",
34+
":types",
35+
"//src/odb",
3236
"//src/utl",
33-
"@tk_tcl//:tcl",
37+
"@boost.container_hash",
38+
"@boost.graph",
39+
"@boost.polygon",
40+
"@openmp",
3441
],
3542
)
3643

3744
cc_library(
3845
name = "ant",
3946
srcs = [
40-
"src/AntennaChecker.cc",
41-
"src/Polygon.cc",
47+
"src/MakeAntennaChecker.cc",
48+
":swig",
49+
":tcl",
4250
],
4351
hdrs = [
4452
"include/ant/AntennaChecker.hh",
45-
"src/PinType.hh",
46-
"src/Polygon.hh",
47-
],
48-
includes = [
49-
"include",
53+
"include/ant/GlobalRouteSource.hh",
54+
"include/ant/MakeAntennaChecker.hh",
5055
],
56+
includes = ["include"],
5157
deps = [
52-
":types",
58+
":lib",
5359
"//:ord",
60+
"//src/grt:types",
5461
"//src/odb",
5562
"//src/utl",
56-
"@boost.container_hash",
57-
"@boost.graph",
58-
"@boost.polygon",
59-
"@openmp//:openmp",
6063
"@tk_tcl//:tcl",
6164
],
6265
)

src/ant/src/AntennaChecker.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "ant/AntennaChecker.hh"
55

66
#include <omp.h>
7-
#include <tcl.h>
87

98
#include <algorithm>
109
#include <boost/pending/disjoint_sets.hpp>
@@ -55,10 +54,6 @@ struct AntennaModel
5554
double diff_metal_reduce_factor;
5655
};
5756

58-
extern "C" {
59-
extern int Ant_Init(Tcl_Interp* interp);
60-
}
61-
6257
AntennaChecker::AntennaChecker() = default;
6358
AntennaChecker::~AntennaChecker() = default;
6459

0 commit comments

Comments
 (0)