summaryrefslogtreecommitdiff
path: root/community-testing/llvm/enable-lto.patch
blob: 40d93104a6dbe6a26ded910726b2e31982fa8b68 (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
31
32
33
34
35
36
Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp	(revision 123373)
+++ lib/Driver/ToolChains.cpp	(working copy)
@@ -1398,11 +1398,11 @@
     Lib = Lib64;
   }
 
-  llvm::sys::Path LinkerPath(Base + "/../../../../" + GccTriple + "/bin/ld");
+  llvm::sys::Path LinkerPath(Base + "/../../../../" + GccTriple + "/bin/ld.gold");
   if (!llvm::sys::fs::exists(LinkerPath.str(), Exists) && Exists)
     Linker = LinkerPath.str();
   else
-    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 @@
     }
   }
 
-  if (Args.hasArg(options::OPT_use_gold_plugin)) {
+  // if (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));
-  }
+  // }
 
   C.addCommand(new Command(JA, *this, ToolChain.Linker.c_str(), CmdArgs));
 }