mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
AIX: Add an option to disable automatic exports from shared libraries
Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports
for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we always export
all symbols from shared libraries by default. Add a new target property
called `AIX_EXPORT_ALL_SYMBOLS` that can be explicitly set to OFF to
suppress this behavior and export no symbols by default.
Fixes: #20290
This commit is contained in:
@@ -196,6 +196,8 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule(
|
||||
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();
|
||||
|
||||
@@ -219,6 +221,7 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule(
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user