Merge topic 'cache-ldconfigpaths'

f173ca21ca cmBinUtilsLinuxELFLinker: Cache ldconfig results

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8811
This commit is contained in:
Brad King
2023-09-20 13:46:26 +00:00
committed by Kitware Robot
+5 -6
View File
@@ -73,6 +73,9 @@ bool cmBinUtilsLinuxELFLinker::Prepare()
if (ldConfigTool == "ldconfig") {
this->LDConfigTool =
cm::make_unique<cmLDConfigLDConfigTool>(this->Archive);
if (!this->LDConfigTool->GetLDConfigPaths(this->LDConfigPaths)) {
return false;
}
} else {
std::ostringstream e;
e << "Invalid value for CMAKE_LDCONFIG_TOOL: " << ldConfigTool;
@@ -132,12 +135,8 @@ bool cmBinUtilsLinuxELFLinker::ScanDependencies(
parentRpaths.end());
}
std::vector<std::string> ldConfigPaths;
if (!this->LDConfigTool->GetLDConfigPaths(ldConfigPaths)) {
return false;
}
searchPaths.insert(searchPaths.end(), ldConfigPaths.begin(),
ldConfigPaths.end());
searchPaths.insert(searchPaths.end(), this->LDConfigPaths.begin(),
this->LDConfigPaths.end());
for (auto const& dep : needed) {
if (!this->Archive->IsPreExcluded(dep)) {