[cfe-commits] r143778 - /cfe/trunk/lib/Driver/Tools.cpp
Peter Collingbourne
peter at pcc.me.uk
Fri Nov 4 20:47:53 PDT 2011
Author: pcc
Date: Fri Nov 4 22:47:53 2011
New Revision: 143778
URL: http://llvm.org/viewvc/llvm-project?rev=143778&view=rev
Log:
On Linux, enable the gold plugin if we are using LTO.
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=143778&r1=143777&r2=143778&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Nov 4 22:47:53 2011
@@ -4462,7 +4462,7 @@
addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
- if (Args.hasArg(options::OPT_use_gold_plugin)) {
+ if (D.IsUsingLTO(Args) || Args.hasArg(options::OPT_use_gold_plugin)) {
CmdArgs.push_back("-plugin");
std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
CmdArgs.push_back(Args.MakeArgString(Plugin));
More information about the cfe-commits
mailing list