[cfe-commits] r113226 - /cfe/trunk/lib/Driver/Tools.cpp
Daniel Dunbar
daniel at zuster.org
Tue Sep 7 10:50:41 PDT 2010
Author: ddunbar
Date: Tue Sep 7 12:50:41 2010
New Revision: 113226
URL: http://llvm.org/viewvc/llvm-project?rev=113226&view=rev
Log:
Driver/Darwin: Catch another case where ld ends up using ld_classic.
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=113226&r1=113225&r2=113226&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Sep 7 12:50:41 2010
@@ -2209,6 +2209,16 @@
// FIXME: This is a temporary workaround, ld should be handling this.
bool UsesLdClassic = (getToolChain().getArch() == llvm::Triple::x86 &&
Args.hasArg(options::OPT_static));
+ if (getToolChain().getArch() == llvm::Triple::x86) {
+ for (arg_iterator it = Args.filtered_begin(options::OPT_Xlinker,
+ options::OPT_Wl_COMMA),
+ ie = Args.filtered_end(); it != ie; ++it) {
+ const Arg *A = *it;
+ for (unsigned i = 0, e = A->getNumValues(); i != e; ++i)
+ if (llvm::StringRef(A->getValue(Args, i)) == "-kext")
+ UsesLdClassic = true;
+ }
+ }
if (!UsesLdClassic)
CmdArgs.push_back("-demangle");
}
More information about the cfe-commits
mailing list