From 431a672b7cbbdcad0a0fd9d799ca33d8a3f7084f Mon Sep 17 00:00:00 2001 From: Michele Scuttari Date: Sun, 22 Dec 2024 19:54:22 +0100 Subject: [PATCH] Add KINSOL driver to libraries linked by MARCO --- clang/lib/Driver/ToolChains/CommonArgs.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp index dcd73e5339a1b7..b8576aeb85c324 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -1363,7 +1363,11 @@ void tools::addMarcoLinkerArgs(const ToolChain &TC, } // Add the main simulation driver. - CmdArgs.push_back("-lMARCORuntimeSimulation"); + if (staticBuild) { + CmdArgs.push_back("-lMARCORuntimeSimulation_static"); + } else { + CmdArgs.push_back("-lMARCORuntimeSimulation"); + } // Add the libraries of the solver. if (solver == "euler-forward") { @@ -1377,6 +1381,10 @@ void tools::addMarcoLinkerArgs(const ToolChain &TC, CmdArgs.push_back("-lMARCORuntimeSolverRungeKutta"); } + if (!staticBuild) { + CmdArgs.push_back("-lMARCORuntimeDriverKINSOL"); + } + // Add the Modelica support library. CmdArgs.push_back("-lMARCORuntimeSupport");