summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/linking.c
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-03-06 05:43:53 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-03-06 05:43:53 +0000
commit67fafb973cfbd0ac08f3177a344e5cdd4fee4ae6 (patch)
treef30bc5f8d2527f0fbcee879592d3c47149576dd7 /test/OpenMP/linking.c
parenta95abca11b63dc3fc1c0aa7efe7f87ea8bc73bc1 (diff)
[OPENMP] Added option -fopenmp=libiomp5|libgomp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/linking.c')
-rw-r--r--test/OpenMP/linking.c55
1 files changed, 54 insertions, 1 deletions
diff --git a/test/OpenMP/linking.c b/test/OpenMP/linking.c
index 31fd57de92..586e4606d1 100644
--- a/test/OpenMP/linking.c
+++ b/test/OpenMP/linking.c
@@ -1,5 +1,5 @@
// Test the that the driver produces reasonable linker invocations with
-// -fopenmp.
+// -fopenmp or -fopenmp=libiomp5|libgomp.
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -fopenmp -target i386-unknown-linux \
@@ -14,3 +14,56 @@
// CHECK-LD-64: "{{.*}}ld{{(.exe)?}}"
// CHECK-LD-64: "-lgomp" "-lrt" "-lgcc"
// CHECK-LD-64: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=libgomp -target i386-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-32 %s
+// CHECK-GOMP-LD-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-GOMP-LD-32: "-lgomp" "-lrt" "-lgcc"
+// CHECK-GOMP-LD-32: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=libgomp -target x86_64-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-64 %s
+// CHECK-GOMP-LD-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-GOMP-LD-64: "-lgomp" "-lrt" "-lgcc"
+// CHECK-GOMP-LD-64: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=libiomp5 -target i386-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-32 %s
+// CHECK-IOMP5-LD-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-IOMP5-LD-32: "-liomp5"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=libiomp5 -target x86_64-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-64 %s
+// CHECK-IOMP5-LD-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-IOMP5-LD-64: "-liomp5"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=lib -target i386-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-LIB-LD-32 %s
+// CHECK-LIB-LD-32: error: unsupported argument 'lib' to option 'fopenmp='
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=lib -target x86_64-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-LIB-LD-64 %s
+// CHECK-LIB-LD-64: error: unsupported argument 'lib' to option 'fopenmp='
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp -fopenmp=libiomp5 -target i386-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-LD-WARN-32 %s
+// CHECK-LD-WARN-32: warning: argument unused during compilation: '-fopenmp=libiomp5'
+// CHECK-LD-WARN-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LD-WARN-32: "-lgomp" "-lrt" "-lgcc"
+// CHECK-LD-WARN-32: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp -fopenmp=libiomp5 -target x86_64-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-LD-WARN-64 %s
+// CHECK-LD-WARN-64: warning: argument unused during compilation: '-fopenmp=libiomp5'
+// CHECK-LD-WARN-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LD-WARN-64: "-lgomp" "-lrt" "-lgcc"
+// CHECK-LD-WARN-64: "-lpthread" "-lc"
+//