Chandler Carruth | 9c6b4f8 | 2015-05-28 01:52:38 +0000 | [diff] [blame] | 1 | // RUN: %clang -target x86_64-linux-gnu -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP |
| 2 | // RUN: %clang -target x86_64-linux-gnu -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP |
| 3 | // RUN: %clang -target x86_64-linux-gnu -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP |
Joerg Sonnenberger | 5c3f9d5 | 2015-09-23 20:07:56 +0000 | [diff] [blame] | 4 | // RUN: %clang -target x86_64-apple-darwin -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP |
| 5 | // RUN: %clang -target x86_64-apple-darwin -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP |
| 6 | // RUN: %clang -target x86_64-apple-darwin -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP |
Dimitry Andric | 0cc6f47 | 2015-10-18 13:32:20 +0000 | [diff] [blame] | 7 | // RUN: %clang -target x86_64-freebsd -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP |
| 8 | // RUN: %clang -target x86_64-freebsd -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP |
| 9 | // RUN: %clang -target x86_64-freebsd -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP |
Joerg Sonnenberger | 27a69a2 | 2015-09-23 20:11:00 +0000 | [diff] [blame] | 10 | // RUN: %clang -target x86_64-netbsd -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP |
| 11 | // RUN: %clang -target x86_64-netbsd -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP |
| 12 | // RUN: %clang -target x86_64-netbsd -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP |
Chandler Carruth | 9c6b4f8 | 2015-05-28 01:52:38 +0000 | [diff] [blame] | 13 | // |
| 14 | // CHECK-CC1-OPENMP: "-cc1" |
| 15 | // CHECK-CC1-OPENMP: "-fopenmp" |
| 16 | // |
| 17 | // CHECK-CC1-NO-OPENMP: "-cc1" |
| 18 | // CHECK-CC1-NO-OPENMP-NOT: "-fopenmp" |
| 19 | // |
Chandler Carruth | 9c6b4f8 | 2015-05-28 01:52:38 +0000 | [diff] [blame] | 20 | // RUN: %clang -target x86_64-linux-gnu -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-OMP |
Jonas Hahnfeld | 8ea76fa | 2017-04-19 13:55:39 +0000 | [diff] [blame] | 21 | // RUN: %clang -target x86_64-linux-gnu -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP --check-prefix=CHECK-LD-GOMP-RT |
Chandler Carruth | 9c6b4f8 | 2015-05-28 01:52:38 +0000 | [diff] [blame] | 22 | // RUN: %clang -target x86_64-linux-gnu -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 |
| 23 | // |
Joerg Sonnenberger | 5c3f9d5 | 2015-09-23 20:07:56 +0000 | [diff] [blame] | 24 | // RUN: %clang -nostdlib -target x86_64-linux-gnu -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP |
| 25 | // RUN: %clang -nostdlib -target x86_64-linux-gnu -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP |
| 26 | // RUN: %clang -nostdlib -target x86_64-linux-gnu -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 |
| 27 | // |
| 28 | // RUN: %clang -target x86_64-darwin -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-OMP |
Jonas Hahnfeld | 8ea76fa | 2017-04-19 13:55:39 +0000 | [diff] [blame] | 29 | // RUN: %clang -target x86_64-darwin -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP --check-prefix=CHECK-LD-GOMP-NO-RT |
Joerg Sonnenberger | 5c3f9d5 | 2015-09-23 20:07:56 +0000 | [diff] [blame] | 30 | // RUN: %clang -target x86_64-darwin -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 |
| 31 | // |
| 32 | // RUN: %clang -nostdlib -target x86_64-darwin -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP |
| 33 | // RUN: %clang -nostdlib -target x86_64-darwin -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP |
| 34 | // RUN: %clang -nostdlib -target x86_64-darwin -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 |
| 35 | // |
Jonas Hahnfeld | 8ea76fa | 2017-04-19 13:55:39 +0000 | [diff] [blame] | 36 | // RUN: %clang -target x86_64-freebsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-OMP |
| 37 | // RUN: %clang -target x86_64-freebsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP --check-prefix=CHECK-LD-GOMP-NO-RT |
| 38 | // RUN: %clang -target x86_64-freebsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 |
Joerg Sonnenberger | 27a69a2 | 2015-09-23 20:11:00 +0000 | [diff] [blame] | 39 | // |
Dimitry Andric | 0cc6f47 | 2015-10-18 13:32:20 +0000 | [diff] [blame] | 40 | // RUN: %clang -nostdlib -target x86_64-freebsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP |
| 41 | // RUN: %clang -nostdlib -target x86_64-freebsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP |
| 42 | // RUN: %clang -nostdlib -target x86_64-freebsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 |
| 43 | // |
Jonas Hahnfeld | 8ea76fa | 2017-04-19 13:55:39 +0000 | [diff] [blame] | 44 | // RUN: %clang -target x86_64-netbsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-OMP |
| 45 | // RUN: %clang -target x86_64-netbsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP --check-prefix=CHECK-LD-GOMP-NO-RT |
| 46 | // RUN: %clang -target x86_64-netbsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 |
| 47 | // |
Joerg Sonnenberger | 27a69a2 | 2015-09-23 20:11:00 +0000 | [diff] [blame] | 48 | // RUN: %clang -nostdlib -target x86_64-netbsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP |
| 49 | // RUN: %clang -nostdlib -target x86_64-netbsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP |
| 50 | // RUN: %clang -nostdlib -target x86_64-netbsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 |
| 51 | // |
Chandler Carruth | 9c6b4f8 | 2015-05-28 01:52:38 +0000 | [diff] [blame] | 52 | // CHECK-LD-OMP: "{{.*}}ld{{(.exe)?}}" |
| 53 | // CHECK-LD-OMP: "-lomp" |
| 54 | // |
| 55 | // CHECK-LD-GOMP: "{{.*}}ld{{(.exe)?}}" |
| 56 | // CHECK-LD-GOMP: "-lgomp" |
Jonas Hahnfeld | 8ea76fa | 2017-04-19 13:55:39 +0000 | [diff] [blame] | 57 | // CHECK-LD-GOMP-RT: "-lrt" |
| 58 | // CHECK-LD-GOMP-NO-RT-NOT: "-lrt" |
Chandler Carruth | 9c6b4f8 | 2015-05-28 01:52:38 +0000 | [diff] [blame] | 59 | // |
| 60 | // CHECK-LD-IOMP5: "{{.*}}ld{{(.exe)?}}" |
| 61 | // CHECK-LD-IOMP5: "-liomp5" |
Chandler Carruth | 25c6a22 | 2015-05-28 21:20:14 +0000 | [diff] [blame] | 62 | // |
Joerg Sonnenberger | 5c3f9d5 | 2015-09-23 20:07:56 +0000 | [diff] [blame] | 63 | // CHECK-NO-OMP: "{{.*}}ld{{(.exe)?}}" |
| 64 | // CHECK-NO-OMP-NOT: "-lomp" |
| 65 | // |
| 66 | // CHECK-NO-GOMP: "{{.*}}ld{{(.exe)?}}" |
| 67 | // CHECK-NO-GOMP-NOT: "-lgomp" |
| 68 | // |
| 69 | // CHECK-NO-IOMP5: "{{.*}}ld{{(.exe)?}}" |
| 70 | // CHECK-NO-IOMP5-NOT: "-liomp5" |
| 71 | // |
Chandler Carruth | 25c6a22 | 2015-05-28 21:20:14 +0000 | [diff] [blame] | 72 | // We'd like to check that the default is sane, but until we have the ability |
| 73 | // to *always* semantically analyze OpenMP without always generating runtime |
| 74 | // calls (in the event of an unsupported runtime), we don't have a good way to |
| 75 | // test the CC1 invocation. Instead, just ensure we do eventually link *some* |
| 76 | // OpenMP runtime. |
| 77 | // |
| 78 | // RUN: %clang -target x86_64-linux-gnu -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY |
Joerg Sonnenberger | 5c3f9d5 | 2015-09-23 20:07:56 +0000 | [diff] [blame] | 79 | // RUN: %clang -target x86_64-darwin -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY |
Dimitry Andric | 0cc6f47 | 2015-10-18 13:32:20 +0000 | [diff] [blame] | 80 | // RUN: %clang -target x86_64-freebsd -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY |
Joerg Sonnenberger | 27a69a2 | 2015-09-23 20:11:00 +0000 | [diff] [blame] | 81 | // RUN: %clang -target x86_64-netbsd -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY |
Chandler Carruth | 25c6a22 | 2015-05-28 21:20:14 +0000 | [diff] [blame] | 82 | // |
| 83 | // CHECK-LD-ANY: "{{.*}}ld{{(.exe)?}}" |
| 84 | // CHECK-LD-ANY: "-l{{(omp|gomp|iomp5)}}" |