aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-24 16:47:49 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-24 16:47:49 +0000
commitca0e0545c216afaacba6da6c82a270dc2efc4e3f (patch)
tree61668db01b04c78c6d1e5e2bf3bf7885254b4b8e /lib/Driver/Tools.cpp
parent83482d147a37c4d4f0562f73b0766279c500ffd1 (diff)
Driver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
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
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 0024bc94d8..4f839e9dea 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -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) {