summaryrefslogtreecommitdiff
path: root/extra/llvm/enable-lto.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-26 00:02:35 +0000
committerroot <root@rshg054.dnsready.net>2012-05-26 00:02:35 +0000
commita5721a07196cf00c26ea1bfb651aab756d202ccb (patch)
treeb60f984dd22f98544c8d2fd9526cc24dea3dcd25 /extra/llvm/enable-lto.patch
parentaa30737839de3c2a4a1287442cb9859414fb4b0a (diff)
Sat May 26 00:02:35 UTC 2012
Diffstat (limited to 'extra/llvm/enable-lto.patch')
-rw-r--r--extra/llvm/enable-lto.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/extra/llvm/enable-lto.patch b/extra/llvm/enable-lto.patch
index 3c8691b17..3205fbf69 100644
--- a/extra/llvm/enable-lto.patch
+++ b/extra/llvm/enable-lto.patch
@@ -16,11 +16,11 @@ 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)) {
+ // 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)) {
++ // 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";
@@ -28,5 +28,5 @@ Index: lib/Driver/Tools.cpp
- }
+ // }
- C.addCommand(new Command(JA, *this, ToolChain.Linker.c_str(), CmdArgs));
+ AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs);
}