summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileExecutableTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-26 12:23:36 (GMT)
committerBrad King <brad.king@kitware.com>2022-03-26 12:28:59 (GMT)
commita8dae21ac1872316dfe77e57c59f8441c3d67ce8 (patch)
treebb45e57b080be84214a27b31728bb64872fd0085 /Source/cmMakefileExecutableTargetGenerator.cxx
parentf71e89ae423ad5168509d252e79f460026400768 (diff)
downloadCMake-a8dae21ac1872316dfe77e57c59f8441c3d67ce8.zip
CMake-a8dae21ac1872316dfe77e57c59f8441c3d67ce8.tar.gz
CMake-a8dae21ac1872316dfe77e57c59f8441c3d67ce8.tar.bz2
AIX: Fix executable ENABLE_EXPORTS in Makefile generators
In commit afcd9fe669 (AIX: Add an option to disable automatic exports from shared libraries, 2020-01-30, v3.17.0-rc1~47^2) the population of the `<AIX_EXPORTS>` rule variable placeholder was accidentally added to the device linking rule rather than the main linking rule. This caused our `ExportImportList` script on AIX, when called for executables with `ENABLE_EXPORTS` set, to be given an `AIX_EXPORTS` file name that does not exist, leading to a warning from the `dump` tool. Move the population of the `<AIX_EXPORTS>` placeholder in the Makefile generators to the main link rule. Issue: #20290
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 3a2744e..e7e4a2b 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -195,8 +195,6 @@ void cmMakefileExecutableTargetGenerator::WriteNvidiaDeviceExecutableRule(
this->CreateObjectLists(useLinkScript, false, useResponseFileForObjects,
buildObjs, depends, useWatcomQuote);
- std::string const& aixExports = this->GetAIXExports(this->GetConfigName());
-
cmRulePlaceholderExpander::RuleVariables vars;
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
@@ -217,7 +215,6 @@ void cmMakefileExecutableTargetGenerator::WriteNvidiaDeviceExecutableRule(
cmOutputConverter::SHELL);
vars.Language = linkLanguage.c_str();
- vars.AIXExports = aixExports.c_str();
vars.Objects = buildObjs.c_str();
vars.ObjectDir = objectDir.c_str();
vars.Target = target.c_str();
@@ -528,11 +525,14 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::string manifests = this->GetManifests(this->GetConfigName());
+ std::string const& aixExports = this->GetAIXExports(this->GetConfigName());
+
cmRulePlaceholderExpander::RuleVariables vars;
vars.CMTargetName = this->GeneratorTarget->GetName().c_str();
vars.CMTargetType =
cmState::GetTargetTypeName(this->GeneratorTarget->GetType()).c_str();
vars.Language = linkLanguage.c_str();
+ vars.AIXExports = aixExports.c_str();
vars.Objects = buildObjs.c_str();
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();