Clang Project

clang_source_code/test/Driver/ps4-linker-win.c
1// 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: mkdir -p %t
11// RUN: touch %t/orbis-ld.exe
12// RUN: touch %t/orbis-ld.gold.exe
13
14// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4  %s -fuse-ld=gold -### 2>&1 \
15// RUN:   | FileCheck --check-prefix=CHECK-PS4-GOLD %s
16// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4  %s -shared -### 2>&1 \
17// RUN:   | FileCheck --check-prefix=CHECK-PS4-GOLD %s
18
19// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4  %s -### 2>&1 \
20// RUN:   | FileCheck --check-prefix=CHECK-PS4-LINKER %s
21// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4  %s -fuse-ld=ps4 -### 2>&1 \
22// RUN:   | FileCheck --check-prefix=CHECK-PS4-LINKER %s
23// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4  %s -shared \
24// RUN:     -fuse-ld=ps4 -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-LINKER %s
25
26// CHECK-PS4-GOLD: \\orbis-ld.gold
27// CHECK-PS4-LINKER: \\orbis-ld
28