------------------------------------------------------------------------
r196532 | joerg | 2013-12-05 13:07:29 -0800 (Thu, 05 Dec 2013) | 2 lines
Pass down the target CPU to the system assembler for NetBSD/ARM.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196596
91177308-0d34-0410-b5e6-
96231b3b80d8
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");