diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-09-25 18:10:05 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-09-25 18:10:05 +0000 |
commit | 48f9994bdd9f7f1853782109595b1f80f50afcfa (patch) | |
tree | 1b0a824c8f72be28e1f9e29389a845405c067b2c /lib/Driver/Tools.cpp | |
parent | f1308c738dc1e7a36101d9e96071d0d241bc2ccb (diff) |
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
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index ff4af221e3..0701c5fa7b 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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(); |