[PATCH] D66825: [10/10] [LLD] [COFF] Implement MinGW default manifest handling

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 12:06:48 PDT 2019


mstorsjo marked an inline comment as done.
mstorsjo added inline comments.


================
Comment at: llvm/lib/Object/WindowsResource.cpp:353
     if (!IsNewNode) {
-      Duplicates.push_back(makeDuplicateResourceError(
-          Entry, InputFilenames[Node->Origin], WR->getFileName()));
+      if (!ignoreDuplicate(Entry))
+        Duplicates.push_back(makeDuplicateResourceError(
----------------
thakis wrote:
> Do we have to add code for this to the merging logic? Or is the implicit manifest always res obj file 0 and we can skip that if there are more than 1 res obj files?
Yes, we need to handle it on a per-resource basis during/after merging; as GNU ld does support merging resource objs, the user could legitimately be passing multiple resource objects, and we don't know if one of them is user provided or the default manifest (as we don't know if the compiler driver did inject that or not). Additionally, even if there's one user provided resource object and one default manifest, they need to be merged as we don't know if the user provided resource object actually contained a manifest or not.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66825/new/

https://reviews.llvm.org/D66825





More information about the llvm-commits mailing list