]> granicus.if.org Git - clang/commitdiff
Pass down -mcpu for external assembler in thumb mode, too. From Matt Thomas.
authorJoerg Sonnenberger <joerg@bec.de>
Sun, 2 Feb 2014 22:37:14 +0000 (22:37 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Sun, 2 Feb 2014 22:37:14 +0000 (22:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200661 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index bcaf062ad3d6e211f27eca9d42b0319408f4825c..f65429ef22e63408232627c3be2c38a5e4264073 100644 (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));
   }