]> granicus.if.org Git - clang/commitdiff
Merging r227979:
authorHans Wennborg <hans@hanshq.net>
Tue, 3 Feb 2015 22:57:34 +0000 (22:57 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 3 Feb 2015 22:57:34 +0000 (22:57 +0000)
------------------------------------------------------------------------
r227979 | rafael | 2015-02-03 08:33:53 -0800 (Tue, 03 Feb 2015) | 3 lines

Use CLANG_LIBDIR_SUFFIX when looking for the gold plugin.

Patch by ?\196?\176smail D?\195?\182nmez!
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_36@228059 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 28c46f636ef9734374087a5d99782a4a69801d7b..75eef9ecdf09818f3e47cc004aaae7db90b0db53 100644 (file)
@@ -13,6 +13,7 @@
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/ObjCRuntime.h"
 #include "clang/Basic/Version.h"
+#include "clang/Config/config.h"
 #include "clang/Driver/Action.h"
 #include "clang/Driver/Compilation.h"
 #include "clang/Driver/Driver.h"
@@ -1538,7 +1539,7 @@ static void AddGoldPlugin(const ToolChain &ToolChain, const ArgList &Args,
   // as gold requires -plugin to come before any -plugin-opt that -Wl might
   // forward.
   CmdArgs.push_back("-plugin");
-  std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
+  std::string Plugin = ToolChain.getDriver().Dir + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold.so";
   CmdArgs.push_back(Args.MakeArgString(Plugin));
 
   // Try to pass driver level flags relevant to LTO code generation down to