blob: 1681397b87a4c7ecf0e7d5611838c483787c0fee [file] [log] [blame]
Filipe Cabecinhasc888e192015-10-14 12:25:43 +00001// The full path to the gold linker was not found on Windows because the
2// driver fails to add an .exe extension to the name.
3// We check that gold linker's full name (with an extension) is specified
4// on the command line if -fuse-ld=gold, or -shared with no -fuse-ld option
5// are passed. Otherwise, we check that the PS4's linker's full name is
6// specified.
7
8// REQUIRES: system-windows, x86-registered-target
9
10// RUN: touch %T/ps4-ld.exe
11// RUN: touch %T/ps4-ld.gold.exe
12
13// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4 %s -fuse-ld=gold -### 2>&1 \
14// RUN: | FileCheck --check-prefix=CHECK-PS4-GOLD %s
15// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4 %s -shared -### 2>&1 \
16// RUN: | FileCheck --check-prefix=CHECK-PS4-GOLD %s
17
18// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4 %s -### 2>&1 \
19// RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s
20// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4 %s -fuse-ld=ps4 -### 2>&1 \
21// RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s
22// RUN: env "PATH=%T" %clang -target x86_64-scei-ps4 %s -shared \
23// RUN: -fuse-ld=ps4 -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-LINKER %s
24
25// CHECK-PS4-GOLD: ps4-ld.gold.exe
26// CHECK-PS4-LINKER: ps4-ld.exe