summaryrefslogtreecommitdiff
path: root/extra/llvm/enable-lto.patch
blob: 9f43e657ef9e1f7522863ed8f8ba63a5aba5ff19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp	(revision 123373)
+++ lib/Driver/ToolChains.cpp	(working copy)
@@ -1398,7 +1398,7 @@
   PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" +
                          GCCInstallation.getTriple() + "/bin").str());
 
-  Linker = GetProgramPath("ld");
+  Linker = GetProgramPath("ld.gold");
 
   LinuxDistro Distro = DetectLinuxDistro(Arch);
 
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp	(revision 123373)
+++ lib/Driver/Tools.cpp	(working copy)
@@ -3412,11 +3412,11 @@
   // Tell the linker to load the plugin. This has to come before AddLinkerInputs
   // as gold requires -plugin to come before any -plugin-opt that -Wl might
   // forward.
   if (D.IsUsingLTO(Args) || Args.hasArg(options::OPT_use_gold_plugin)) {
     CmdArgs.push_back("-plugin");
-    std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
+    std::string Plugin = ToolChain.getDriver().Dir + "/../lib/llvm/LLVMgold.so";
     CmdArgs.push_back(Args.MakeArgString(Plugin));
   }
 
   AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs);
 }