]> granicus.if.org Git - clang/commitdiff
Simplify the set of directories we look for on multiarch systems.
authorChandler Carruth <chandlerc@gmail.com>
Mon, 31 Oct 2011 09:06:40 +0000 (09:06 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 31 Oct 2011 09:06:40 +0000 (09:06 +0000)
I don't have any Debian system with one of these currently, and it seems
unlikely for one to show up suddenly. We can add more patterns here if
they become necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143346 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp

index 0f6828644db02e3da64169f11335198525d18564..d6c0a2ef0e7858d2c45a6ae721c1c9a8ea28f05b 100644 (file)
@@ -1756,21 +1756,15 @@ static std::string getMultiarchTriple(const llvm::Triple TargetTriple,
 
     // We use the existence of '/lib/<triple>' as a directory to detect some
     // common linux triples that don't quite match the Clang triple for both
-    // 32-bit and 64-bit targets. This works around annoying discrepancies on
-    // Debian-based systems.
+    // 32-bit and 64-bit targets. Multiarch fixes its install triples to these
+    // regardless of what the actual target triple is.
   case llvm::Triple::x86:
-    if (llvm::sys::fs::exists(SysRoot + "/lib/i686-linux-gnu"))
-      return "i686-linux-gnu";
     if (llvm::sys::fs::exists(SysRoot + "/lib/i386-linux-gnu"))
       return "i386-linux-gnu";
     return TargetTriple.str();
   case llvm::Triple::x86_64:
     if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-linux-gnu"))
       return "x86_64-linux-gnu";
-    if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-pc-linux-gnu"))
-      return "x86_64-pc-linux-gnu";
-    if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-unknown-linux-gnu"))
-      return "x86_64-unknown-linux-gnu";
     return TargetTriple.str();
   }
 }