If an archive is not recognized as an LLVM bytecode archive then declare
that it is native so that the linker will pass it on downstream. This avoids
a problem where the native link line fails because there is both a .so and
a .a file. The .a file gets processed as bytecode and then dropped from the
command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36584 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Linker/LinkItems.cpp b/lib/Linker/LinkItems.cpp
index 87de4af..ad7ae65 100644
--- a/lib/Linker/LinkItems.cpp
+++ b/lib/Linker/LinkItems.cpp
@@ -90,7 +90,7 @@
       break;
 
     case sys::Archive_FileType:
-      if (LinkInArchive(Pathname))
+      if (LinkInArchive(Pathname, is_native))
         return error("Cannot link archive '" + Pathname.toString() + "'");
       break;
 
@@ -171,7 +171,7 @@
       // A user may specify an ar archive without -l, perhaps because it
       // is not installed as a library. Detect that and link the archive.
       verbose("Linking archive file '" + File.toString() + "'");
-      if (LinkInArchive(File))
+      if (LinkInArchive(File, is_native))
         return error("Cannot link archive '" + File.toString() + "'");
       break;