[lld] r312174 - Revert r312171: Support nested static libraries.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 14:22:59 PDT 2017


Author: ruiu
Date: Wed Aug 30 14:22:59 2017
New Revision: 312174

URL: http://llvm.org/viewvc/llvm-project?rev=312174&view=rev
Log:
Revert r312171: Support nested static libraries.

This reverts commit r312171 because it is pointed out that that's not a
correct fix (see https://bugs.llvm.org/show_bug.cgi?id=32674#c14) and
also because it broke buildbots.

Removed:
    lld/trunk/test/COFF/Inputs/nested-archives.s
    lld/trunk/test/COFF/nested-archives.s
Modified:
    lld/trunk/COFF/InputFiles.cpp

Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=312174&r1=312173&r2=312174&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Wed Aug 30 14:22:59 2017
@@ -65,12 +65,6 @@ void ArchiveFile::parse() {
   // Parse a MemoryBufferRef as an archive file.
   File = check(Archive::create(MB), toString(this));
 
-  // MSVC link.exe supports nested static libraries unlike Unix linkers.
-  // To support that, we'll add inner libraries to the symbol table.
-  for (MemoryBufferRef MB : getArchiveMembers(File.get()))
-    if (identify_magic(MB.getBuffer()) == file_magic::archive)
-      make<ArchiveFile>(MB)->parse();
-
   // Read the symbol table to construct Lazy objects.
   for (const Archive::Symbol &Sym : File->symbols())
     Symtab->addLazy(this, Sym);

Removed: lld/trunk/test/COFF/Inputs/nested-archives.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/Inputs/nested-archives.s?rev=312173&view=auto
==============================================================================
--- lld/trunk/test/COFF/Inputs/nested-archives.s (original)
+++ lld/trunk/test/COFF/Inputs/nested-archives.s (removed)
@@ -1,4 +0,0 @@
-.text
-.global sub
-sub:
-  ret

Removed: lld/trunk/test/COFF/nested-archives.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/nested-archives.s?rev=312173&view=auto
==============================================================================
--- lld/trunk/test/COFF/nested-archives.s (original)
+++ lld/trunk/test/COFF/nested-archives.s (removed)
@@ -1,13 +0,0 @@
-# RUN: llvm-mc %p/Inputs/nested-archives.s -filetype=obj -triple=x86_64-windows-msvc -o %t1.obj
-# RUN: rm -f %t1.lib %t2.lib
-# RUN: llvm-ar cru %t1.lib %t1.obj
-# RUN: llvm-ar cru %t2.lib %t1.lib
-
-# RUN: llvm-mc %s -filetype=obj -triple=x86_64-windows-msvc -o %t2.obj
-# RUN: lld-link -entry:main -nodefaultlib %t2.obj %t2.lib -verbose | FileCheck %s
-# CHECK: Loaded nested-archives.s.tmp1.lib(nested-archives.s.tmp1.obj) for sub
-
-.text
-.global main, sub
-main:
-  call sub




More information about the llvm-commits mailing list