r239047 - [SPARC] Fix multiarch path detection for sparc and sparcv9.
James Y Knight
jyknight at google.com
Thu Jun 4 08:36:31 PDT 2015
Author: jyknight
Date: Thu Jun 4 10:36:30 2015
New Revision: 239047
URL: http://llvm.org/viewvc/llvm-project?rev=239047&view=rev
Log:
[SPARC] Fix multiarch path detection for sparc and sparcv9.
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=239047&r1=239046&r2=239047&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Jun 4 10:36:30 2015
@@ -3115,6 +3115,14 @@ static std::string getMultiarchTriple(co
if (llvm::sys::fs::exists(SysRoot + "/lib/powerpc64le-linux-gnu"))
return "powerpc64le-linux-gnu";
return TargetTriple.str();
+ case llvm::Triple::sparc:
+ if (llvm::sys::fs::exists(SysRoot + "/lib/sparc-linux-gnu"))
+ return "sparc-linux-gnu";
+ return TargetTriple.str();
+ case llvm::Triple::sparcv9:
+ if (llvm::sys::fs::exists(SysRoot + "/lib/sparc64-linux-gnu"))
+ return "sparc64-linux-gnu";
+ return TargetTriple.str();
}
}
More information about the cfe-commits
mailing list