summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>2024-09-27 12:24:11 (GMT)
committerBrad King <brad.king@kitware.com>2024-09-27 21:53:59 (GMT)
commit6c12e0758bceee62daf40c31840a64de28a97142 (patch)
treeb948a056a6a1d216d553022b96a5f76544c7b033 /Source
parentb684ebf6ad0f62bbc656b34bd3067f33dc719578 (diff)
downloadCMake-6c12e0758bceee62daf40c31840a64de28a97142.zip
CMake-6c12e0758bceee62daf40c31840a64de28a97142.tar.gz
CMake-6c12e0758bceee62daf40c31840a64de28a97142.tar.bz2
Ninja: Fix AIX shared library archiving
Extend commit d27fe9dfba (AIX: Add option to archive shared libraries, 2024-06-18) to update the Ninja generator to support the new `AIX_SHARED_LIBRARY_ARCHIVE` feature. Fixes: #26332
Diffstat (limited to 'Source')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index cd9d1ef..891187a 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -1016,7 +1016,8 @@ void cmNinjaNormalTargetGenerator::WriteNvidiaDeviceLinkStatement(
vars["LANGUAGE_COMPILE_FLAGS"] = langFlags;
auto const tgtNames = this->TargetNames(config);
- if (genTarget->HasSOName(config)) {
+ if (genTarget->HasSOName(config) ||
+ genTarget->IsArchivedAIXSharedLibrary()) {
vars["SONAME_FLAG"] =
this->GetMakefile()->GetSONameFlag(this->TargetLinkLanguage(config));
vars["SONAME"] = localGen.ConvertToOutputFormat(tgtNames.SharedObject,
@@ -1315,7 +1316,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
t, gt, this->TargetLinkLanguage(config), config);
vars["LANGUAGE_COMPILE_FLAGS"] = t;
}
- if (gt->HasSOName(config)) {
+ if (gt->HasSOName(config) || gt->IsArchivedAIXSharedLibrary()) {
vars["SONAME_FLAG"] = mf->GetSONameFlag(this->TargetLinkLanguage(config));
vars["SONAME"] = localGen.ConvertToOutputFormat(tgtNames.SharedObject,
cmOutputConverter::SHELL);