1 // Test that the driver always emits -fno-use-init-array on the PS4/PS5 targets
2 // since their ABI does not support the .init_array section.
4 // RUN: %clang -c %s -target x86_64-scei-ps4 -### 2>&1 \
6 // RUN: %clang -c %s -target x86_64-sie-ps5 -### 2>&1 \
8 // RUN: %clang -c %s -target x86_64-scei-ps4 -fno-use-init-array -### 2>&1 \
10 // RUN: %clang -c %s -target x86_64-sie-ps5 -fno-use-init-array -### 2>&1 \
11 // RUN: | FileCheck %s
12 // RUN: not %clang -c %s --target=x86_64-scei-ps4 -fuse-init-array -### 2>&1 \
13 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
14 // RUN: not %clang -c %s --target=x86_64-sie-ps5 -fuse-init-array -### 2>&1 \
15 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
17 // CHECK: "-fno-use-init-array"
18 // CHECK-NOT: "-fuse-init-array"
20 // CHECK-ERROR: unsupported option '-fuse-init-array' for target 'x86_64-{{(scei|sie)}}-ps{{[45]}}'