Not all targets will use -plugin with -flto. Pick a fixed target so
this works regardless of the default target (regardless of host OS,
the toolchain should be picking the correct LTO plugin for a target
that supports it).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310966
91177308-0d34-0410-b5e6-
96231b3b80d8
// Check that Darwin uses LLVMgold.dylib.
// REQUIRES: system-darwin
-// RUN: %clang -### %s -flto 2>&1 \
+// RUN: %clang -target x86_64-unknown-linux -### %s -flto 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-LTO-PLUGIN %s
//
// CHECK-LTO-PLUGIN: "-plugin" "{{.*}}/LLVMgold.dylib"
// Check that non-Windows, non-Darwin OSs use LLVMgold.so.
// REQUIRES: !system-darwin && !system-windows
-// RUN: %clang -### %s -flto 2>&1 \
+// RUN: %clang -target x86_64-unknown-linux -### %s -flto 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-LTO-PLUGIN %s
//
// CHECK-LTO-PLUGIN: "-plugin" "{{.*}}/LLVMgold.so"
// Check that Windows uses LLVMgold.dll.
// REQUIRES: system-windows
-// RUN: %clang -### %s -flto 2>&1 \
+// RUN: %clang -target x86_64-unknown-linux -### %s -flto 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-LTO-PLUGIN %s
//
// CHECK-LTO-PLUGIN: "-plugin" "{{.*}}/LLVMgold.dll"