[coff] for /msvclto, pass archive members with prevailing symbols first

Summary: When using /msvclto, lld and MSVC's linker both do their own symbol resolution. This can cause them to select different archive members, which can result in undefined references. This change avoids that situation by extracting archive members that are selected by lld and passing those to link.exe before any archives, so that MSVC's uses those objects for symbol resolution instead of different archive members.

Reviewers: pcc, rnk, ruiu

Reviewed By: pcc

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D32317


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@301045 91177308-0d34-0410-b5e6-96231b3b80d8
5 files changed
tree: 23882909aa60966bc3ebd8583577de3c91f41fbd
  1. cmake/
  2. COFF/
  3. docs/
  4. ELF/
  5. include/
  6. lib/
  7. test/
  8. tools/
  9. unittests/
  10. .arcconfig
  11. .clang-format
  12. .gitignore
  13. CMakeLists.txt
  14. CODE_OWNERS.TXT
  15. LICENSE.TXT
  16. README.md
README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.