]> granicus.if.org Git - clang/commitdiff
Revert "Fix LLVMgold plugin name/path for non-Linux."
authorDan Albert <danalbert@google.com>
Tue, 15 Aug 2017 00:31:44 +0000 (00:31 +0000)
committerDan Albert <danalbert@google.com>
Tue, 15 Aug 2017 00:31:44 +0000 (00:31 +0000)
Broke a test. Will fix the test and re-land later.

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

lib/Driver/ToolChains/CommonArgs.cpp

index b9b5b2cbe6edd7a043c80f1c158d3614286de07d..1273b7aabc029d65ce000077fec81c10b80fb33f 100644 (file)
@@ -376,20 +376,8 @@ void tools::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");
-
-#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