aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-11-05 03:47:53 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-11-05 03:47:53 +0000
commit79d481a08522ab031528c0047df565330c1cd562 (patch)
tree150b0275c08e3a386bb9bc2bb0b3f35b6a618417 /lib/Driver/Tools.cpp
parenta160671c579b6db38dfc4072baa99d4ad1d4300c (diff)
On Linux, enable the gold plugin if we are using LTO.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index bfd73827b4..6e739f0a95 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -4462,7 +4462,7 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA,
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));