]> granicus.if.org Git - clang/commitdiff
On !Darwin, do use the integrated as with -static.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 18 Mar 2011 15:50:12 +0000 (15:50 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 18 Mar 2011 15:50:12 +0000 (15:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127879 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Driver.cpp

index f713fa0b3bdbd755fbf6f2de2738bec6ab7642b5..41a0edc2ba3f6e2c2f7e7c08e5e850ac00919896 100644 (file)
@@ -1079,7 +1079,9 @@ static const Tool &SelectToolForJob(Compilation &C, const ToolChain *TC,
   bool HasStatic = (C.getArgs().hasArg(options::OPT_mkernel) ||
                     C.getArgs().hasArg(options::OPT_static) ||
                     C.getArgs().hasArg(options::OPT_fapple_kext));
-  bool IsIADefault = (TC->IsIntegratedAssemblerDefault() && !HasStatic);
+  bool IsDarwin = TC->getTriple().getOS() == llvm::Triple::Darwin;
+  bool IsIADefault = TC->IsIntegratedAssemblerDefault() &&
+    !(HasStatic && IsDarwin);
   if (C.getArgs().hasFlag(options::OPT_integrated_as,
                          options::OPT_no_integrated_as,
                          IsIADefault) &&