1
1
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
2
- index 293ea212c..d4df13f4a 100755
2
+ index 1b51a5a1a..ca6bfd14b 100755
3
3
--- a/src/CMakeLists.txt
4
4
+++ b/src/CMakeLists.txt
5
- @@ -168 ,6 +168 ,9 @@ message(STATUS "boost: ${Boost_VERSION}")
5
+ @@ -169 ,6 +169 ,9 @@ message(STATUS "boost: ${Boost_VERSION}")
6
6
find_package(Python3 COMPONENTS Development REQUIRED)
7
7
option(BUILD_PYTHON "Build the Python3 interface" ON)
8
8
@@ -12,7 +12,7 @@ index 293ea212c..d4df13f4a 100755
12
12
option(ALLOW_WARNINGS "Flag to allow compilation with compiler warnings: on by default" ON)
13
13
if (NOT ALLOW_WARNINGS)
14
14
add_compile_options(
15
- @@ -250 ,10 +253 ,14 @@ add_subdirectory(cts)
15
+ @@ -251 ,10 +254 ,14 @@ add_subdirectory(cts)
16
16
add_subdirectory(grt)
17
17
add_subdirectory(tap)
18
18
add_subdirectory(mpl)
@@ -22,161 +22,46 @@ index 293ea212c..d4df13f4a 100755
22
22
+ endif()
23
23
add_subdirectory(rcx)
24
24
add_subdirectory(psm)
25
- + if (BUILD_PAR)
26
- add_subdirectory(par)
25
+ - add_subdirectory(par)
26
+ + if ((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND BUILD_PAR)
27
+ + add_subdirectory(par)
27
28
+ endif()
28
29
add_subdirectory(ant)
29
30
add_subdirectory(gui)
30
31
add_subdirectory(drt)
31
- @@ -319,7 +326,6 @@ target_link_libraries(openroad
32
- mpl
33
- psm
34
- ant
35
- - par
36
- upf
37
- utl
38
- pdn
39
- @@ -329,12 +335,19 @@ target_link_libraries(openroad
32
+ @@ -329,15 +336,23 @@ target_link_libraries(openroad
40
33
${CMAKE_THREAD_LIBS_INIT}
41
34
)
42
35
43
36
- if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
44
37
+ if ((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND BUILD_MPL2)
45
- # mpl2 aborts with link error on darwin so do not link it.
46
- target_link_libraries(openroad mpl2)
38
+ # mpl2 aborts with link error on darwin and par causes abseil link error at startup on apple silicon so do not link it.
39
+ - target_link_libraries(openroad mpl2 par)
40
+ + target_link_libraries(openroad mpl2)
47
41
target_compile_definitions(openroad PRIVATE ENABLE_MPL2)
48
- else()
49
- - message(STATUS "Removing MPL2 to avoid run time fatal error.")
50
- + message(STATUS "MPL2 macro placer disabled.")
42
+ + else()
43
+ + message(STATUS "Removing MPL2 to avoid run time fatal error.")
51
44
+ endif()
52
45
+
53
- + if (BUILD_PAR)
46
+ + if ((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND BUILD_PAR)
47
+ + # mpl2 aborts with link error on darwin and par causes abseil link error at startup on apple silicon so do not link it.
54
48
+ target_link_libraries(openroad par)
55
- + target_compile_definitions(openroad PRIVATE ENABLE_PAR)
56
- + else()
57
- + message(STATUS "PAR partitioner disabled.")
49
+ target_compile_definitions(openroad PRIVATE ENABLE_PAR)
50
+ else()
51
+ - message(STATUS "Removing MPL2 and PAR to avoid run time fatal error.")
52
+ + message(STATUS "Removing PAR to avoid run time fatal error.")
58
53
endif()
59
54
55
+ +
60
56
# tclReadline
61
- @@ -398,7 +411,6 @@ if (Python3_FOUND AND BUILD_PYTHON)
62
- drt_py
63
- dpo_py
64
- fin_py
65
- - par_py
66
- rcx_py
67
- rmp_py
68
- stt_py
69
- @@ -406,10 +418,17 @@ if (Python3_FOUND AND BUILD_PYTHON)
70
- pdn_py
57
+ if (TCL_READLINE_LIBRARY AND TCL_READLINE_H)
58
+ target_compile_definitions(openroad PRIVATE ENABLE_READLINE)
59
+ @@ -407,7 +422,7 @@ if (Python3_FOUND AND BUILD_PYTHON)
71
60
dft_py
72
61
)
73
- + if (BUILD_PAR)
74
- + target_link_libraries(openroad par_py)
75
- + else()
76
- + message(STATUS "PAR partitioner disabled.")
77
- + endif()
78
- else()
79
- message(STATUS "Python3 disabled")
80
- endif()
81
-
82
- +
83
- +
84
- messages(
85
- TARGET openroad
86
- SOURCE_DIR .
87
- diff --git a/src/Main.cc b/src/Main.cc
88
- index 255699ee0..b934b6b1e 100644
89
- --- a/src/Main.cc
90
- +++ b/src/Main.cc
91
- @@ -93,7 +93,6 @@ using std::string;
92
- X(drt) \
93
- X(dpo) \
94
- X(fin) \
95
- - X(par) \
96
- X(rcx) \
97
- X(rmp) \
98
- X(stt) \
99
- @@ -108,6 +107,9 @@ using std::string;
100
- extern "C" {
101
- #define X(name) extern PyObject* PyInit__##name##_py();
102
- FOREACH_TOOL(X)
103
- + #ifdef ENABLE_PAR
104
- + X(par)
105
- + #endif
106
- #undef X
107
- }
108
- #endif
109
- @@ -126,6 +128,9 @@ static void showSplash();
110
- namespace sta {
111
- #define X(name) extern const char* name##_py_python_inits[];
112
- FOREACH_TOOL(X)
113
- + #ifdef ENABLE_PAR
114
- + X(par)
115
- + #endif
116
- #undef X
117
- } // namespace sta
118
62
119
- @@ -137,6 +142,9 @@ static void initPython()
120
- exit(1); \
121
- }
122
- FOREACH_TOOL(X)
123
- + #ifdef ENABLE_PAR
124
- + X(par)
125
- + #endif
126
- #undef X
127
- Py_Initialize();
128
- #define X(name) \
129
- @@ -157,6 +165,9 @@ static void initPython()
130
- delete[] unencoded; \
131
- }
132
- FOREACH_TOOL_WITHOUT_OPENROAD(X)
133
- + #ifdef ENABLE_PAR
134
- + X(par)
135
- + #endif
136
- #undef X
137
- #undef FOREACH_TOOL
138
- #undef FOREACH_TOOL_WITHOUT_OPENROAD
139
- diff --git a/src/OpenRoad.cc b/src/OpenRoad.cc
140
- index c90e40db9..c8a9a8109 100644
141
- --- a/src/OpenRoad.cc
142
- +++ b/src/OpenRoad.cc
143
- @@ -70,7 +70,9 @@
144
- #include "odb/lefout.h"
145
- #include "ord/InitOpenRoad.hh"
146
- #include "pad/MakeICeWall.h"
147
- + #ifdef ENABLE_PAR
148
- #include "par/MakePartitionMgr.h"
149
- + #endif
150
- #include "pdn/MakePdnGen.hh"
151
- #include "ppl/MakeIoplacer.h"
152
- #include "psm/MakePDNSim.hh"
153
- @@ -175,7 +177,9 @@ OpenRoad::~OpenRoad()
154
- deleteFinale(finale_);
155
- deleteAntennaChecker(antenna_checker_);
156
- odb::dbDatabase::destroy(db_);
157
- + #ifdef ENABLE_PAR
158
- deletePartitionMgr(partitionMgr_);
159
- + #endif
160
- deletePdnGen(pdngen_);
161
- deleteICeWall(icewall_);
162
- deleteDistributed(distributer_);
163
- @@ -231,7 +235,9 @@ void OpenRoad::init(Tcl_Interp* tcl_interp)
164
- replace_ = makeReplace();
165
- pdnsim_ = makePDNSim();
166
- antenna_checker_ = makeAntennaChecker();
167
- + #ifdef ENABLE_PAR
168
- partitionMgr_ = makePartitionMgr();
169
- + #endif
170
- pdngen_ = makePdnGen();
171
- icewall_ = makeICeWall();
172
- distributer_ = makeDistributed();
173
- @@ -270,7 +276,9 @@ void OpenRoad::init(Tcl_Interp* tcl_interp)
174
- initTritonRoute(this);
175
- initPDNSim(this);
176
- initAntennaChecker(this);
177
- + #ifdef ENABLE_PAR
178
- initPartitionMgr(this);
179
- + #endif
180
- initPdnGen(this);
181
- initDistributed(this);
182
- initSteinerTreeBuilder(this);
63
+ - if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
64
+ + if ((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND BUILD_PAR)
65
+ # par_py causes abseil link error at startup on apple silicon so do not link it.
66
+ target_link_libraries(openroad par_py)
67
+ else()
0 commit comments