r227979 - Use CLANG_LIBDIR_SUFFIX when looking for the gold plugin.

Rafael Espindola rafael.espindola at gmail.com
Tue Feb 3 08:33:53 PST 2015


Author: rafael
Date: Tue Feb  3 10:33:53 2015
New Revision: 227979

URL: http://llvm.org/viewvc/llvm-project?rev=227979&view=rev
Log:
Use CLANG_LIBDIR_SUFFIX when looking for the gold plugin.

Patch by İsmail Dönmez!

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=227979&r1=227978&r2=227979&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Feb  3 10:33:53 2015
@@ -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"
@@ -1531,7 +1532,7 @@ static void AddGoldPlugin(const ToolChai
   // 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






More information about the cfe-commits mailing list