Filipe Cabecinhas | c888e19 | 2015-10-14 12:25:43 +0000 | [diff] [blame] | 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: touch %T/ps4-ld.exe |
| 11 | // RUN: touch %T/ps4-ld.gold.exe |
| 12 | |
NAKAMURA Takumi | 430443b | 2015-10-15 13:51:13 +0000 | [diff] [blame] | 13 | // RUN: env "PATH=%T;%PATH%" %clang -target x86_64-scei-ps4 %s -fuse-ld=gold -### 2>&1 \ |
Filipe Cabecinhas | c888e19 | 2015-10-14 12:25:43 +0000 | [diff] [blame] | 14 | // RUN: | FileCheck --check-prefix=CHECK-PS4-GOLD %s |
NAKAMURA Takumi | 430443b | 2015-10-15 13:51:13 +0000 | [diff] [blame] | 15 | // RUN: env "PATH=%T;%PATH%" %clang -target x86_64-scei-ps4 %s -shared -### 2>&1 \ |
Filipe Cabecinhas | c888e19 | 2015-10-14 12:25:43 +0000 | [diff] [blame] | 16 | // RUN: | FileCheck --check-prefix=CHECK-PS4-GOLD %s |
| 17 | |
NAKAMURA Takumi | 430443b | 2015-10-15 13:51:13 +0000 | [diff] [blame] | 18 | // RUN: env "PATH=%T;%PATH%" %clang -target x86_64-scei-ps4 %s -### 2>&1 \ |
Filipe Cabecinhas | c888e19 | 2015-10-14 12:25:43 +0000 | [diff] [blame] | 19 | // RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s |
NAKAMURA Takumi | 430443b | 2015-10-15 13:51:13 +0000 | [diff] [blame] | 20 | // RUN: env "PATH=%T;%PATH%" %clang -target x86_64-scei-ps4 %s -fuse-ld=ps4 -### 2>&1 \ |
Filipe Cabecinhas | c888e19 | 2015-10-14 12:25:43 +0000 | [diff] [blame] | 21 | // RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s |
NAKAMURA Takumi | 430443b | 2015-10-15 13:51:13 +0000 | [diff] [blame] | 22 | // RUN: env "PATH=%T;%PATH%" %clang -target x86_64-scei-ps4 %s -shared \ |
Filipe Cabecinhas | c888e19 | 2015-10-14 12:25:43 +0000 | [diff] [blame] | 23 | // RUN: -fuse-ld=ps4 -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-LINKER %s |
| 24 | |
NAKAMURA Takumi | 430443b | 2015-10-15 13:51:13 +0000 | [diff] [blame] | 25 | // FIXME: "Output\\" is hardcoded part of %T. |
| 26 | // CHECK-PS4-GOLD: Output\\ps4-ld.gold.exe" |
| 27 | // CHECK-PS4-LINKER: Output\\ps4-ld.exe" |