Driver: Claim -arch options when pipelining, and claim arguments that
are forwarded to GCC. - The later is unfortunate, as it prevents us from generally warning about anything interesting on platforms that use a generic toolchain. However, we can't do much better without significantly complicating things, and generally we should have proper tool chain definitions. llvm-svn: 67293
This commit is contained in:
parent
5cdf3e0fb9
commit
2da027244d
|
@ -328,6 +328,7 @@ void Driver::BuildUniversalActions(const ArgList &Args,
|
||||||
// FIXME: We need to handle canonicalization of the specified
|
// FIXME: We need to handle canonicalization of the specified
|
||||||
// arch?
|
// arch?
|
||||||
|
|
||||||
|
A->claim();
|
||||||
if (ArchNames.insert(Name))
|
if (ArchNames.insert(Name))
|
||||||
Archs.push_back(Name);
|
Archs.push_back(Name);
|
||||||
}
|
}
|
||||||
|
@ -374,7 +375,7 @@ void Driver::BuildUniversalActions(const ArgList &Args,
|
||||||
<< types::getTypeName(Act->getType());
|
<< types::getTypeName(Act->getType());
|
||||||
|
|
||||||
ActionList Inputs;
|
ActionList Inputs;
|
||||||
for (unsigned i = 0, e = Archs.size(); i != e; ++i )
|
for (unsigned i = 0, e = Archs.size(); i != e; ++i)
|
||||||
Inputs.push_back(new BindArchAction(Act, Archs[i]));
|
Inputs.push_back(new BindArchAction(Act, Archs[i]));
|
||||||
|
|
||||||
// Lipo if necessary, We do it this way because we need to set the
|
// Lipo if necessary, We do it this way because we need to set the
|
||||||
|
|
|
@ -354,8 +354,13 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
for (ArgList::const_iterator
|
for (ArgList::const_iterator
|
||||||
it = Args.begin(), ie = Args.end(); it != ie; ++it) {
|
it = Args.begin(), ie = Args.end(); it != ie; ++it) {
|
||||||
Arg *A = *it;
|
Arg *A = *it;
|
||||||
if (A->getOption().hasForwardToGCC())
|
if (A->getOption().hasForwardToGCC()) {
|
||||||
|
// 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.
|
||||||
|
A->claim();
|
||||||
A->render(Args, CmdArgs);
|
A->render(Args, CmdArgs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderExtraToolArgs(CmdArgs);
|
RenderExtraToolArgs(CmdArgs);
|
||||||
|
|
Loading…
Reference in New Issue