]> granicus.if.org Git - clang/commitdiff
Driver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
authorDaniel Dunbar <daniel@zuster.org>
Tue, 24 Aug 2010 16:47:49 +0000 (16:47 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 24 Aug 2010 16:47:49 +0000 (16:47 +0000)
integrated assembler. For now this mostly just means that we will error out if
someone tries to use this mechanism to send an argument to the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111921 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 0024bc94d8df95adf9c75af3e49e0058fd31de95..4f839e9dea398201b2bacecb24e87241b64af5c9 100644 (file)
@@ -708,6 +708,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
                       options::OPT_mno_relax_all,
                       !IsOpt))
       CmdArgs.push_back("-mrelax-all");
+
+    // When using an integrated assembler, we send -Wa, and -Xassembler options
+    // to -cc1.
+    Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
+                         options::OPT_Xassembler);
   } else if (isa<PrecompileJobAction>(JA)) {
     // Use PCH if the user requested it.
     bool UsePCH = D.CCCUsePCH;
@@ -1322,7 +1327,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back("-fdiagnostics-show-category");
     CmdArgs.push_back(A->getValue(Args));
   }
-  
+
   // Color diagnostics are the default, unless the terminal doesn't support
   // them.
   if (Args.hasFlag(options::OPT_fcolor_diagnostics,
@@ -1337,7 +1342,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   if (!Args.hasFlag(options::OPT_fspell_checking,
                     options::OPT_fno_spell_checking))
     CmdArgs.push_back("-fno-spell-checking");
-  
+
   if (Arg *A = Args.getLastArg(options::OPT_fshow_overloads_EQ))
     A->render(Args, CmdArgs);
 
@@ -1426,7 +1431,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     for (ArgList::const_iterator it = Args.begin(),
            ie = Args.end(); it != ie; ++it)
       (*it)->render(Args, OriginalArgs);
-    
+
     llvm::SmallString<256> Flags;
     Flags += Exec;
     for (unsigned i = 0, e = OriginalArgs.size(); i != e; ++i) {