[cfe-commits] r114793 - /cfe/trunk/lib/Driver/Tools.cpp
Daniel Dunbar
daniel at zuster.org
Sat Sep 25 11:10:05 PDT 2010
Author: ddunbar
Date: Sat Sep 25 13:10:05 2010
New Revision: 114793
URL: http://llvm.org/viewvc/llvm-project?rev=114793&view=rev
Log:
Driver/Linux: Translate rewritten lib options back to standard -l form when
using generic GCC tools.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=114793&r1=114792&r2=114793&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sat Sep 25 13:10:05 2010
@@ -1693,9 +1693,18 @@
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();
More information about the cfe-commits
mailing list