diff options
Diffstat (limited to 'Source/cmComputeLinkDepends.cxx')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 596572b..b5a8419 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -27,7 +27,6 @@ #include "cmMakefile.h" #include "cmMessageType.h" #include "cmRange.h" -#include "cmSourceFile.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" #include "cmTarget.h" @@ -321,9 +320,6 @@ cmComputeLinkDepends::Compute() // Follow the link dependencies of the target to be linked. this->AddDirectLinkEntries(); - // Add dependencies on targets named by $<TARGET_OBJECTS:...> sources. - this->AddTargetObjectEntries(); - // Complete the breadth-first search of dependencies. while (!this->BFSQueue.empty()) { // Get the next entry. @@ -504,6 +500,8 @@ std::pair<size_t, bool> cmComputeLinkDepends::AddLinkEntry( void cmComputeLinkDepends::AddLinkObject(cmLinkItem const& item) { + assert(!item.Target); // The item is an object file, not its target. + // Allocate a spot for the item entry. auto lei = this->AllocateLinkEntry(item); @@ -517,7 +515,6 @@ void cmComputeLinkDepends::AddLinkObject(cmLinkItem const& item) LinkEntry& entry = this->EntryList[index]; entry.Item = BT<std::string>(item.AsStr(), item.Backtrace); entry.Kind = LinkEntry::Object; - entry.Target = item.Target; // Record explicitly linked object files separately. this->ObjectEntries.emplace_back(index); @@ -706,21 +703,6 @@ void cmComputeLinkDepends::AddDirectLinkEntries() } } -void cmComputeLinkDepends::AddTargetObjectEntries() -{ - std::vector<cmSourceFile const*> externalObjects; - this->Target->GetExternalObjects(externalObjects, this->Config); - for (auto const* externalObject : externalObjects) { - std::string const& objLib = externalObject->GetObjectLibrary(); - if (objLib.empty()) { - continue; - } - cmLinkItem const& objItem = - this->Target->ResolveLinkItem(BT<std::string>(objLib)); - this->AddLinkObject(objItem); - } -} - template <typename T> void cmComputeLinkDepends::AddLinkEntries(size_t depender_index, std::vector<T> const& libs) |