summaryrefslogtreecommitdiffstats
path: root/Source/cmBinUtilsLinuxELFLinker.h
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-03-14 15:58:34 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-06-10 18:35:28 (GMT)
commit1f9ef25130caa89969cc69b4873edf1723533a5f (patch)
treef48bf3864cc3c6ccd87e6efffcba2c1f582ac0e0 /Source/cmBinUtilsLinuxELFLinker.h
parentf36719111de99e5be426552e9aaba96518b888b7 (diff)
downloadCMake-1f9ef25130caa89969cc69b4873edf1723533a5f.zip
CMake-1f9ef25130caa89969cc69b4873edf1723533a5f.tar.gz
CMake-1f9ef25130caa89969cc69b4873edf1723533a5f.tar.bz2
file: Add GET_RUNTIME_DEPENDENCIES mode
Co-Authored-by: Bryon Bean <bryon.bean@kitware.com>
Diffstat (limited to 'Source/cmBinUtilsLinuxELFLinker.h')
-rw-r--r--Source/cmBinUtilsLinuxELFLinker.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/Source/cmBinUtilsLinuxELFLinker.h b/Source/cmBinUtilsLinuxELFLinker.h
new file mode 100644
index 0000000..348edc4
--- /dev/null
+++ b/Source/cmBinUtilsLinuxELFLinker.h
@@ -0,0 +1,44 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+
+#ifndef cmBinUtilsLinuxELFLinker_h
+#define cmBinUtilsLinuxELFLinker_h
+
+#include "cmBinUtilsLinker.h"
+#include "cmBinUtilsLinuxELFGetRuntimeDependenciesTool.h"
+#include "cmLDConfigTool.h"
+#include "cmStateTypes.h"
+
+#include <memory> // IWYU pragma: keep
+#include <string>
+#include <vector>
+
+class cmRuntimeDependencyArchive;
+
+class cmBinUtilsLinuxELFLinker : public cmBinUtilsLinker
+{
+public:
+ cmBinUtilsLinuxELFLinker(cmRuntimeDependencyArchive* archive);
+
+ bool Prepare() override;
+
+ bool ScanDependencies(std::string const& file,
+ cmStateEnums::TargetType type) override;
+
+private:
+ std::unique_ptr<cmBinUtilsLinuxELFGetRuntimeDependenciesTool> Tool;
+ std::unique_ptr<cmLDConfigTool> LDConfigTool;
+ bool HaveLDConfigPaths = false;
+ std::vector<std::string> LDConfigPaths;
+
+ bool ScanDependencies(std::string const& file,
+ std::vector<std::string> const& parentRpaths);
+
+ bool ResolveDependency(std::string const& name,
+ std::vector<std::string> const& searchPaths,
+ std::string& path, bool& resolved);
+
+ bool GetLDConfigPaths();
+};
+
+#endif // cmBinUtilsLinuxELFLinker_h