[cfe-commits] r112124 - /cfe/trunk/lib/Driver/ToolChains.cpp
Daniel Dunbar
daniel at zuster.org
Wed Aug 25 17:55:52 PDT 2010
Author: ddunbar
Date: Wed Aug 25 19:55:52 2010
New Revision: 112124
URL: http://llvm.org/viewvc/llvm-project?rev=112124&view=rev
Log:
Driver/Darwin: Pass the right arch specific dir for ARM, when linking.
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=112124&r1=112123&r2=112124&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Aug 25 19:55:52 2010
@@ -409,9 +409,17 @@
default:
break;
case llvm::Triple::arm:
- case llvm::Triple::thumb:
- // FIXME: Get the right subdirectory for ARM.
+ case llvm::Triple::thumb: {
+ std::string Triple = ComputeLLVMTriple(Args);
+ llvm::StringRef TripleStr = Triple;
+ if (TripleStr.startswith("armv5") || TripleStr.startswith("thumbv5"))
+ ArchSpecificDir = "v5";
+ else if (TripleStr.startswith("armv6") || TripleStr.startswith("thumbv6"))
+ ArchSpecificDir = "v6";
+ else if (TripleStr.startswith("armv7") || TripleStr.startswith("thumbv7"))
+ ArchSpecificDir = "v7";
break;
+ }
case llvm::Triple::ppc64:
ArchSpecificDir = "ppc64";
break;
@@ -422,7 +430,6 @@
if (ArchSpecificDir) {
P.appendComponent(ArchSpecificDir);
- llvm::errs() << P.str() << "\n";
if (P.exists())
CmdArgs.push_back(Args.MakeArgString("-L" + P.str()));
P.eraseComponent();
More information about the cfe-commits
mailing list