summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/ps4-runtime-flags.c
diff options
context:
space:
mode:
authorPaul Robinson <paul_robinson@playstation.sony.com>2015-12-16 17:25:27 +0000
committerPaul Robinson <paul_robinson@playstation.sony.com>2015-12-16 17:25:27 +0000
commitd083b9a8f67a10d24e2ccceb96b92a9a0dd119bc (patch)
tree0c1facd92aac5a6003281e8bb3fe5f7224f1fd65 /clang/test/Driver/ps4-runtime-flags.c
parentb69b92855d3e2c525186c7a9da89745f3eee7ccf (diff)
downloadbcm5719-llvm-d083b9a8f67a10d24e2ccceb96b92a9a0dd119bc.tar.gz
bcm5719-llvm-d083b9a8f67a10d24e2ccceb96b92a9a0dd119bc.zip
[PS4][Profile] add "--dependent-lib=libclang_rt.profile-x86_64.a" to
the CC1 command line when enabling code coverage. Patch by Ying Yi! Differential Revision: http://reviews.llvm.org/D15222 llvm-svn: 255784
Diffstat (limited to 'clang/test/Driver/ps4-runtime-flags.c')
-rw-r--r--clang/test/Driver/ps4-runtime-flags.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Driver/ps4-runtime-flags.c b/clang/test/Driver/ps4-runtime-flags.c
new file mode 100644
index 00000000000..315976d4e22
--- /dev/null
+++ b/clang/test/Driver/ps4-runtime-flags.c
@@ -0,0 +1,19 @@
+// REQUIRES: x86-registered-target
+//
+// Test the profile runtime library to be linked for PS4 compiler.
+// Check PS4 runtime flag --dependent-lib which does not append the default library search path.
+//
+// RUN: %clang -target x86_64-scei-ps4 --coverage %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fprofile-arcs %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fno-profile-arcs -fprofile-arcs %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fno-profile-arcs %s -### 2>&1 | FileCheck -check-prefix=CHECK-PS4-NO-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fprofile-arcs -fno-profile-arcs %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-NO-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fprofile-generate %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fno-profile-generate %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-NO-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fprofile-generate=dir %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fprofile-instr-generate %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fno-profile-instr-generate %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-NO-PROFILE %s
+// RUN: %clang -target x86_64-scei-ps4 -fprofile-instr-generate=somefile.profraw %s -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-PROFILE %s
+//
+// CHECK-PS4-PROFILE: "--dependent-lib=libclang_rt.profile-x86_64.a"
+// CHECK-PS4-NO-PROFILE-NOT: "--dependent-lib=libclang_rt.profile-x86_64.a"
OpenPOWER on IntegriCloud