[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / ps4-ps5-linker-win.c
blobfcb203c26fb62c5531ba91315fa68d825852325e
1 // This test checks that orbis-ld is used for PS4 linker all the time, and
2 // prospero-lld is used for PS5 linker. Specifying -fuse-ld causes an error.
4 // REQUIRES: system-windows
6 // RUN: mkdir -p %t
7 // RUN: touch %t/orbis-ld.exe
8 // RUN: touch %t/prospero-lld.exe
10 // RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4 %s -### 2>&1 \
11 // RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s
12 // RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4 %s -shared -### 2>&1 \
13 // RUN: | FileCheck --check-prefixes=CHECK-PS4-LINKER,SHARED %s
14 // RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-sie-ps5 %s -### 2>&1 \
15 // RUN: | FileCheck --check-prefix=CHECK-PS5-LINKER %s
16 // RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-sie-ps5 %s -shared -### 2>&1 \
17 // RUN: | FileCheck --check-prefixes=CHECK-PS5-LINKER,SHARED %s
19 // CHECK-PS4-LINKER: \\orbis-ld
20 // CHECK-PS5-LINKER: \\prospero-lld
21 // SHARED: "--shared"
23 // RUN: env "PATH=%t;%PATH%;" not %clang --target=x86_64-scei-ps4 %s -fuse-ld=gold -### 2>&1 \
24 // RUN: | FileCheck --check-prefix=ERROR %s
25 // RUN: env "PATH=%t;%PATH%;" not %clang --target=x86_64-sie-ps5 %s -fuse-ld=gold -### 2>&1 \
26 // RUN: | FileCheck --check-prefix=ERROR %s
28 // ERROR: error: unsupported option '-fuse-ld' for target 'x86_64-{{(scei|sie)}}-ps{{[45]}}'