r196532 - Pass down the target CPU to the system assembler for NetBSD/ARM.

Joerg Sonnenberger joerg at bec.de
Thu Dec 5 13:07:29 PST 2013


Author: joerg
Date: Thu Dec  5 15:07:29 2013
New Revision: 196532

URL: http://llvm.org/viewvc/llvm-project?rev=196532&view=rev
Log:
Pass down the target CPU to the system assembler for NetBSD/ARM.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=196532&r1=196531&r2=196532&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Dec  5 15:07:29 2013
@@ -5975,6 +5975,13 @@ void netbsd::Assemble::ConstructJob(Comp
   if (getToolChain().getArch() == llvm::Triple::x86)
     CmdArgs.push_back("--32");
 
+  // Pass the target CPU to GNU as for ARM, since the source code might
+  // not have the correct .cpu annotation.
+  if (getToolChain().getArch() == llvm::Triple::arm) {
+    std::string MArch(getARMTargetCPU(Args, getToolChain().getTriple()));
+    CmdArgs.push_back(Args.MakeArgString("-mcpu=" + MArch));
+  }
+
   // Set byte order explicitly
   if (getToolChain().getArch() == llvm::Triple::mips)
     CmdArgs.push_back("-EB");





More information about the cfe-commits mailing list