From e2da153501f22edad963b82d9b4585b4816b948c Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Tue, 29 Oct 2024 04:54:07 +0000 Subject: [PATCH] ord: fix last commit Signed-off-by: Matt Liberty --- src/Main.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Main.cc b/src/Main.cc index 5a78aed931..c629d2b333 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -204,6 +204,12 @@ static void initPython() static volatile sig_atomic_t fatal_error_in_progress = 0; +// When we enter through main() we have a single tech and design. +// Custom applications using OR as a library might define multiple. +// Such applications won't allocate or use these objects. +static std::unique_ptr the_tech; +static std::unique_ptr the_design; + static void handler(int sig) { if (fatal_error_in_progress) { @@ -265,11 +271,8 @@ int main(int argc, char* argv[]) cmd_argc = argc; cmd_argv = argv; - // When we enter through main() we have a single tech and design. - // Custom applications using OR as a library might define multiple. - // Such applications won't allocate or use these objects. - auto the_tech = std::make_unique(); - auto the_design = std::make_unique(the_tech.get()); + the_tech = std::make_unique(); + the_design = std::make_unique(the_tech.get()); ord::OpenRoad::setOpenRoad(the_design->getOpenRoad()); #ifdef ENABLE_PYTHON3 if (findCmdLineFlag(cmd_argc, cmd_argv, "-python")) {