[cfe-commits] r143346 - /cfe/trunk/lib/Driver/ToolChains.cpp

Douglas Gregor dgregor at apple.com
Mon Oct 31 09:25:41 PDT 2011


Bill, please merge this to the 3.0 branch (part 3/3).

	- Doug

On Oct 31, 2011, at 2:06 AM, Chandler Carruth wrote:

> Author: chandlerc
> Date: Mon Oct 31 04:06:40 2011
> New Revision: 143346
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=143346&view=rev
> Log:
> Simplify the set of directories we look for on multiarch systems.
> 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.
> 
> Modified:
>    cfe/trunk/lib/Driver/ToolChains.cpp
> 
> Modified: cfe/trunk/lib/Driver/ToolChains.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=143346&r1=143345&r2=143346&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/ToolChains.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChains.cpp Mon Oct 31 04:06:40 2011
> @@ -1756,21 +1756,15 @@
> 
>     // 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();
>   }
> }
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list