Driver: Don't forward any -g options to GCC, when using it to drive the

assembler.
 - Fixes PR6218, hopefully.

llvm-svn: 110111
This commit is contained in:
Daniel Dunbar
2010-08-03 16:14:14 +00:00
parent 758f71af11
commit 939c1211cc

View File

@@ -1600,6 +1600,11 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
it = Args.begin(), ie = Args.end(); it != ie; ++it) {
Arg *A = *it;
if (A->getOption().hasForwardToGCC()) {
// Don't forward any -g arguments to assembly steps.
if (isa<AssembleJobAction>(JA) &&
A->getOption().matches(options::OPT_g_Group))
continue;
// It is unfortunate that we have to claim here, as this means
// we will basically never report anything interesting for
// platforms using a generic gcc, even if we are just using gcc