diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-20 04:24:19 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-20 04:24:19 +0000 |
commit | db39021ceebbd311125785d407402b74ec668528 (patch) | |
tree | 6a1a9692eb1269740cf03e7ebf02f9d5626dd4cb /clang/test/OpenMP/linking.c | |
parent | 16dc7b68c4d90cd3abac7015c27030f3d6c710f9 (diff) | |
download | bcm5719-llvm-db39021ceebbd311125785d407402b74ec668528.tar.gz bcm5719-llvm-db39021ceebbd311125785d407402b74ec668528.zip |
[OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)
-fopenmp turns on OpenMP support and links libiomp5 as OpenMP library. Also there is -fopenmp={libiomp5|libgomp} option that allows to override effect of -fopenmp and link libgomp library (if -fopenmp=libgomp is specified).
Differential Revision: http://reviews.llvm.org/D9736
llvm-svn: 237769
Diffstat (limited to 'clang/test/OpenMP/linking.c')
-rw-r--r-- | clang/test/OpenMP/linking.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/clang/test/OpenMP/linking.c b/clang/test/OpenMP/linking.c index 979ba1f4e41..a2757a512fe 100644 --- a/clang/test/OpenMP/linking.c +++ b/clang/test/OpenMP/linking.c @@ -1,18 +1,18 @@ // Test the that the driver produces reasonable linker invocations with -// -fopenmp or -fopenmp=libiomp5|libgomp. +// -fopenmp or -fopenmp|libgomp. // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: -fopenmp -target i386-unknown-linux \ // RUN: | FileCheck --check-prefix=CHECK-LD-32 %s // CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" -// CHECK-LD-32: "-lgomp" "-lrt" "-lgcc" +// CHECK-LD-32: "-liomp5" "-lgcc" // CHECK-LD-32: "-lpthread" "-lc" // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: -fopenmp -target x86_64-unknown-linux \ // RUN: | FileCheck --check-prefix=CHECK-LD-64 %s // CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" -// CHECK-LD-64: "-lgomp" "-lrt" "-lgcc" +// CHECK-LD-64: "-liomp5" "-lgcc" // CHECK-LD-64: "-lpthread" "-lc" // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ @@ -30,14 +30,14 @@ // 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: -fopenmp -target i386-unknown-linux \ // RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-32 %s // CHECK-IOMP5-LD-32: "{{.*}}ld{{(.exe)?}}" // CHECK-IOMP5-LD-32: "-liomp5" "-lgcc" // CHECK-IOMP5-LD-32: "-lpthread" "-lc" // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -// RUN: -fopenmp=libiomp5 -target x86_64-unknown-linux \ +// RUN: -fopenmp -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" "-lgcc" @@ -54,18 +54,16 @@ // 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: -fopenmp -fopenmp=libgomp -target i386-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-LD-OVERRIDE-32 %s +// CHECK-LD-OVERRIDE-32: "{{.*}}ld{{(.exe)?}}" +// CHECK-LD-OVERRIDE-32: "-lgomp" "-lrt" "-lgcc" +// CHECK-LD-OVERRIDE-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" +// RUN: -fopenmp -fopenmp=libgomp -target x86_64-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-LD-OVERRIDE-64 %s +// CHECK-LD-OVERRIDE-64: "{{.*}}ld{{(.exe)?}}" +// CHECK-LD-OVERRIDE-64: "-lgomp" "-lrt" "-lgcc" +// CHECK-LD-OVERRIDE-64: "-lpthread" "-lc" // |