From 67fafb973cfbd0ac08f3177a344e5cdd4fee4ae6 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 6 Mar 2014 05:43:53 +0000 Subject: [OPENMP] Added option -fopenmp=libiomp5|libgomp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203081 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/OpenMP/linking.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'test/OpenMP/linking.c') 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" +// -- cgit v1.2.3