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

Dan Albert via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 15 16:57:34 PDT 2017


Author: danalbert
Date: Tue Aug 15 16:57:34 2017
New Revision: 310977

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

Removed:
    cfe/trunk/test/Driver/lto-plugin-darwin.c
    cfe/trunk/test/Driver/lto-plugin-linux.c
    cfe/trunk/test/Driver/lto-plugin-windows.c
Modified:
    cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
    cfe/trunk/test/Driver/freebsd.c
    cfe/trunk/test/Driver/gold-lto.c
    cfe/trunk/test/Driver/lto.c
    cfe/trunk/test/Driver/thinlto.c

Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp?rev=310977&r1=310976&r2=310977&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp Tue Aug 15 16:57:34 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

Modified: cfe/trunk/test/Driver/freebsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/freebsd.c?rev=310977&r1=310976&r2=310977&view=diff
==============================================================================
--- cfe/trunk/test/Driver/freebsd.c (original)
+++ cfe/trunk/test/Driver/freebsd.c Tue Aug 15 16:57:34 2017
@@ -127,7 +127,7 @@
 
 // RUN: %clang -target x86_64-pc-freebsd8 %s -### -flto 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-LTO %s
-// CHECK-LTO: ld{{.*}}" "-plugin{{.*}}LLVMgold.{{dll|dylib|so}}
+// CHECK-LTO: ld{{.*}}" "-plugin{{.*}}LLVMgold.so
 
 // RUN: %clang -target sparc-unknown-freebsd8 %s -### -fpic -no-integrated-as 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-SPARC-PIE %s

Modified: cfe/trunk/test/Driver/gold-lto.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/gold-lto.c?rev=310977&r1=310976&r2=310977&view=diff
==============================================================================
--- cfe/trunk/test/Driver/gold-lto.c (original)
+++ cfe/trunk/test/Driver/gold-lto.c Tue Aug 15 16:57:34 2017
@@ -3,14 +3,14 @@
 // RUN: %clang -target x86_64-unknown-linux -### %t.o -flto 2>&1 \
 // RUN:     -Wl,-plugin-opt=foo -O3 \
 // RUN:     | FileCheck %s --check-prefix=CHECK-X86-64-BASIC
-// CHECK-X86-64-BASIC: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-X86-64-BASIC: "-plugin" "{{.*}}/LLVMgold.so"
 // CHECK-X86-64-BASIC: "-plugin-opt=O3"
 // CHECK-X86-64-BASIC: "-plugin-opt=foo"
 //
 // RUN: %clang -target x86_64-unknown-linux -### %t.o -flto 2>&1 \
 // RUN:     -march=corei7 -Wl,-plugin-opt=foo -Ofast \
 // RUN:     | FileCheck %s --check-prefix=CHECK-X86-64-COREI7
-// CHECK-X86-64-COREI7: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-X86-64-COREI7: "-plugin" "{{.*}}/LLVMgold.so"
 // CHECK-X86-64-COREI7: "-plugin-opt=mcpu=corei7"
 // CHECK-X86-64-COREI7: "-plugin-opt=O3"
 // CHECK-X86-64-COREI7: "-plugin-opt=foo"
@@ -18,11 +18,11 @@
 // RUN: %clang -target arm-unknown-linux -### %t.o -flto 2>&1 \
 // RUN:     -march=armv7a -Wl,-plugin-opt=foo -O0 \
 // RUN:     | FileCheck %s --check-prefix=CHECK-ARM-V7A
-// CHECK-ARM-V7A: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-ARM-V7A: "-plugin" "{{.*}}/LLVMgold.so"
 // CHECK-ARM-V7A: "-plugin-opt=mcpu=generic"
 // CHECK-ARM-V7A: "-plugin-opt=O0"
 // CHECK-ARM-V7A: "-plugin-opt=foo"
 //
 // RUN: %clang -target i686-linux-android -### %t.o -flto 2>&1 \
 // RUN:     | FileCheck %s --check-prefix=CHECK-X86-ANDROID
-// CHECK-X86-ANDROID: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-X86-ANDROID: "-plugin" "{{.*}}/LLVMgold.so"

Removed: cfe/trunk/test/Driver/lto-plugin-darwin.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/lto-plugin-darwin.c?rev=310976&view=auto
==============================================================================
--- cfe/trunk/test/Driver/lto-plugin-darwin.c (original)
+++ cfe/trunk/test/Driver/lto-plugin-darwin.c (removed)
@@ -1,6 +0,0 @@
-// Check that Darwin uses LLVMgold.dylib.
-// REQUIRES: system-darwin
-// RUN: %clang -### %s -flto 2>&1 \
-// RUN:   | FileCheck -check-prefix=CHECK-LTO-PLUGIN %s
-//
-// CHECK-LTO-PLUGIN: "-plugin" "{{.*}}/LLVMgold.dylib"

Removed: cfe/trunk/test/Driver/lto-plugin-linux.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/lto-plugin-linux.c?rev=310976&view=auto
==============================================================================
--- cfe/trunk/test/Driver/lto-plugin-linux.c (original)
+++ cfe/trunk/test/Driver/lto-plugin-linux.c (removed)
@@ -1,6 +0,0 @@
-// Check that non-Windows, non-Darwin OSs use LLVMgold.so.
-// REQUIRES: !system-darwin && !system-windows
-// RUN: %clang -### %s -flto 2>&1 \
-// RUN:   | FileCheck -check-prefix=CHECK-LTO-PLUGIN %s
-//
-// CHECK-LTO-PLUGIN: "-plugin" "{{.*}}/LLVMgold.so"

Removed: cfe/trunk/test/Driver/lto-plugin-windows.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/lto-plugin-windows.c?rev=310976&view=auto
==============================================================================
--- cfe/trunk/test/Driver/lto-plugin-windows.c (original)
+++ cfe/trunk/test/Driver/lto-plugin-windows.c (removed)
@@ -1,6 +0,0 @@
-// Check that Windows uses LLVMgold.dll.
-// REQUIRES: system-windows
-// RUN: %clang -### %s -flto 2>&1 \
-// RUN:   | FileCheck -check-prefix=CHECK-LTO-PLUGIN %s
-//
-// CHECK-LTO-PLUGIN: "-plugin" "{{.*}}/LLVMgold.dll"

Modified: cfe/trunk/test/Driver/lto.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/lto.c?rev=310977&r1=310976&r2=310977&view=diff
==============================================================================
--- cfe/trunk/test/Driver/lto.c (original)
+++ cfe/trunk/test/Driver/lto.c Tue Aug 15 16:57:34 2017
@@ -36,19 +36,19 @@
 // RUN: %clang -target x86_64-unknown-linux -### %s -flto 2> %t
 // RUN: FileCheck -check-prefix=CHECK-LINK-LTO-ACTION < %t %s
 //
-// CHECK-LINK-LTO-ACTION: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-LINK-LTO-ACTION: "-plugin" "{{.*}}/LLVMgold.so"
 
 // -flto=full should cause link using gold plugin
 // RUN: %clang -target x86_64-unknown-linux -### %s -flto=full 2> %t
 // RUN: FileCheck -check-prefix=CHECK-LINK-FULL-ACTION < %t %s
 //
-// CHECK-LINK-FULL-ACTION: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-LINK-FULL-ACTION: "-plugin" "{{.*}}/LLVMgold.so"
 
 // Check that subsequent -fno-lto takes precedence
 // RUN: %clang -target x86_64-unknown-linux -### %s -flto=full -fno-lto 2> %t
 // RUN: FileCheck -check-prefix=CHECK-LINK-NOLTO-ACTION < %t %s
 //
-// CHECK-LINK-NOLTO-ACTION-NOT: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-LINK-NOLTO-ACTION-NOT: "-plugin" "{{.*}}/LLVMgold.so"
 
 // -flto passes along an explicit debugger tuning argument.
 // RUN: %clang -target x86_64-unknown-linux -### %s -flto -glldb 2> %t

Modified: cfe/trunk/test/Driver/thinlto.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/thinlto.c?rev=310977&r1=310976&r2=310977&view=diff
==============================================================================
--- cfe/trunk/test/Driver/thinlto.c (original)
+++ cfe/trunk/test/Driver/thinlto.c Tue Aug 15 16:57:34 2017
@@ -19,19 +19,19 @@
 // RUN: %clang -target x86_64-unknown-linux -### %s -flto=full -fno-lto -flto=thin 2> %t
 // RUN: FileCheck -check-prefix=CHECK-LINK-THIN-ACTION < %t %s
 //
-// CHECK-LINK-THIN-ACTION: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-LINK-THIN-ACTION: "-plugin" "{{.*}}/LLVMgold.so"
 // CHECK-LINK-THIN-ACTION: "-plugin-opt=thinlto"
 
 // Check that subsequent -flto=full takes precedence
 // RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -flto=full 2> %t
 // RUN: FileCheck -check-prefix=CHECK-LINK-FULL-ACTION < %t %s
 //
-// CHECK-LINK-FULL-ACTION: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-LINK-FULL-ACTION: "-plugin" "{{.*}}/LLVMgold.so"
 // CHECK-LINK-FULL-ACTION-NOT: "-plugin-opt=thinlto"
 
 // Check that subsequent -fno-lto takes precedence
 // RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -fno-lto 2> %t
 // RUN: FileCheck -check-prefix=CHECK-LINK-NOLTO-ACTION < %t %s
 //
-// CHECK-LINK-NOLTO-ACTION-NOT: "-plugin" "{{.*}}/LLVMgold.{{dll|dylib|so}}"
+// CHECK-LINK-NOLTO-ACTION-NOT: "-plugin" "{{.*}}/LLVMgold.so"
 // CHECK-LINK-NOLTO-ACTION-NOT: "-plugin-opt=thinlto"




More information about the cfe-commits mailing list