[cfe-commits] r81368 - /cfe/trunk/lib/Driver/Tools.cpp

Daniel Dunbar daniel at zuster.org
Wed Sep 9 11:36:27 PDT 2009


Author: ddunbar
Date: Wed Sep  9 13:36:27 2009
New Revision: 81368

URL: http://llvm.org/viewvc/llvm-project?rev=81368&view=rev
Log:
Use AddDarwinArch for passing arch name to assembler.

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=81368&r1=81367&r2=81368&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Sep  9 13:36:27 2009
@@ -1284,10 +1284,12 @@
   }
 
   // Derived from asm spec.
-  CmdArgs.push_back("-arch");
-  CmdArgs.push_back(Args.MakeArgString(getToolChain().getArchName().c_str()));
+  AddDarwinArch(Args, CmdArgs);
+
+  if (!getDarwinToolChain().isIPhone() ||
+      Args.hasArg(options::OPT_force__cpusubtype__ALL))
+    CmdArgs.push_back("-force_cpusubtype_ALL");
 
-  CmdArgs.push_back("-force_cpusubtype_ALL");
   if (getToolChain().getTriple().getArch() != llvm::Triple::x86_64 &&
       (Args.hasArg(options::OPT_mkernel) ||
        Args.hasArg(options::OPT_static) ||
@@ -1409,9 +1411,6 @@
     break;
 
   case llvm::Triple::arm: {
-    // FIXME: gcc isn't actually following this, it looks like the arch is
-    // getting forced somewhere else (translation?).
-
     if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) {
       if (const char *Arch = GetArmArchForMArch(A->getValue(Args))) {
         CmdArgs.push_back(Arch);





More information about the cfe-commits mailing list