Pass down -mcpu for external assembler in thumb mode, too. From Matt Thomas.

llvm-svn: 200661
This commit is contained in:
Joerg Sonnenberger 2014-02-02 22:37:14 +00:00
parent 1e205ef7cf
commit dc7a23c660
1 changed files with 2 additions and 1 deletions

View File

@ -6025,7 +6025,8 @@ void netbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
// 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) {
if (getToolChain().getArch() == llvm::Triple::arm ||
getToolChain().getArch() == llvm::Triple::thumb) {
std::string MArch(arm::getARMTargetCPU(Args, getToolChain().getTriple()));
CmdArgs.push_back(Args.MakeArgString("-mcpu=" + MArch));
}