зеркало из https://github.com/microsoft/clang-1.git
Driver/Linux: Translate rewritten lib options back to standard -l form when
using generic GCC tools. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114793 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
f1308c738d
Коммит
48f9994bdd
|
@ -1693,9 +1693,18 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
|
||||
if (II.isFilename())
|
||||
CmdArgs.push_back(II.getFilename());
|
||||
else
|
||||
else {
|
||||
const Arg &A = II.getInputArg();
|
||||
|
||||
// Reverse translate some rewritten options.
|
||||
if (A.getOption().matches(options::OPT_Z_reserved_lib_stdcxx)) {
|
||||
CmdArgs.push_back("-lstdc++");
|
||||
continue;
|
||||
}
|
||||
|
||||
// Don't render as input, we need gcc to do the translations.
|
||||
II.getInputArg().render(Args, CmdArgs);
|
||||
A.render(Args, CmdArgs);
|
||||
}
|
||||
}
|
||||
|
||||
const char *GCCName = getToolChain().getDriver().getCCCGenericGCCName().c_str();
|
||||
|
|
Загрузка…
Ссылка в новой задаче