r310903 - Revert "Fix LLVMgold plugin name/path for non-Linux."

Dan Albert via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 14 17:31:44 PDT 2017


Author: danalbert
Date: Mon Aug 14 17:31:44 2017
New Revision: 310903

URL: http://llvm.org/viewvc/llvm-project?rev=310903&view=rev
Log:
Revert "Fix LLVMgold plugin name/path for non-Linux."

Broke a test. Will fix the test and re-land later.

Modified:
    cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp

Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp?rev=310903&r1=310902&r2=310903&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp Mon Aug 14 17:31:44 2017
@@ -376,20 +376,8 @@ void tools::AddGoldPlugin(const ToolChai
   // as gold requires -plugin to come before any -plugin-opt that -Wl might
   // forward.
   CmdArgs.push_back("-plugin");
-
-#if defined(LLVM_ON_WIN32)
-  const char *Suffix = ".dll";
-#elif defined(__APPLE__)
-  const char *Suffix = ".dylib";
-#else
-  const char *Suffix = ".so";
-#endif
-
-  SmallString<1024> Plugin;
-  llvm::sys::path::native(Twine(ToolChain.getDriver().Dir) +
-                              "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold" +
-                              Suffix,
-                          Plugin);
+  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