2013-01-17 21:19:29 +08:00
|
|
|
// Test the that the driver produces reasonable linker invocations with
|
2015-05-20 12:24:19 +08:00
|
|
|
// -fopenmp or -fopenmp|libgomp.
|
2013-01-17 21:19:29 +08:00
|
|
|
//
|
2015-05-21 06:48:44 +08:00
|
|
|
// FIXME: Replace DEFAULT_OPENMP_LIB below with the value chosen at configure time.
|
|
|
|
//
|
2013-01-17 21:19:29 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -fopenmp -target i386-unknown-linux -rtlib=platform \
|
2013-01-17 21:19:29 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-32 %s
|
|
|
|
// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}"
|
2017-03-08 17:07:33 +08:00
|
|
|
// CHECK-LD-32: "-l[[DEFAULT_OPENMP_LIB:[^"]*]]"
|
2013-01-17 21:19:29 +08:00
|
|
|
// CHECK-LD-32: "-lpthread" "-lc"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -fopenmp -target x86_64-unknown-linux -rtlib=platform \
|
2013-01-17 21:19:29 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-64 %s
|
|
|
|
// CHECK-LD-64: "{{.*}}ld{{(.exe)?}}"
|
2017-03-08 17:07:33 +08:00
|
|
|
// CHECK-LD-64: "-l[[DEFAULT_OPENMP_LIB:[^"]*]]"
|
2013-01-17 21:19:29 +08:00
|
|
|
// CHECK-LD-64: "-lpthread" "-lc"
|
2014-03-06 13:43:53 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -fopenmp=libgomp -target i386-unknown-linux -rtlib=platform \
|
2014-03-06 13:43:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-32 %s
|
2017-12-30 02:07:07 +08:00
|
|
|
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target i386-unknown-linux -rtlib=platform | FileCheck --check-prefix SIMD-ONLY2 %s
|
|
|
|
// SIMD-ONLY2-NOT: lgomp
|
|
|
|
// SIMD-ONLY2-NOT: lomp
|
|
|
|
// SIMD-ONLY2-NOT: liomp
|
2014-03-06 13:43:53 +08:00
|
|
|
// CHECK-GOMP-LD-32: "{{.*}}ld{{(.exe)?}}"
|
2017-03-08 17:07:33 +08:00
|
|
|
// CHECK-GOMP-LD-32: "-lgomp" "-lrt"
|
2014-03-06 13:43:53 +08:00
|
|
|
// CHECK-GOMP-LD-32: "-lpthread" "-lc"
|
2017-12-30 01:36:15 +08:00
|
|
|
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target i386-unknown-linux -rtlib=platform | FileCheck --check-prefix SIMD-ONLY2 %s
|
|
|
|
// SIMD-ONLY2-NOT: lgomp
|
|
|
|
// SIMD-ONLY2-NOT: lomp
|
|
|
|
// SIMD-ONLY2-NOT: liomp
|
2014-03-06 13:43:53 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -fopenmp=libgomp -target x86_64-unknown-linux -rtlib=platform \
|
2014-03-06 13:43:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-64 %s
|
|
|
|
// CHECK-GOMP-LD-64: "{{.*}}ld{{(.exe)?}}"
|
2017-03-08 17:07:33 +08:00
|
|
|
// CHECK-GOMP-LD-64: "-lgomp" "-lrt"
|
2014-03-06 13:43:53 +08:00
|
|
|
// CHECK-GOMP-LD-64: "-lpthread" "-lc"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -fopenmp -target i386-unknown-linux -rtlib=platform \
|
2014-03-06 13:43:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-32 %s
|
|
|
|
// CHECK-IOMP5-LD-32: "{{.*}}ld{{(.exe)?}}"
|
2017-03-08 17:07:33 +08:00
|
|
|
// CHECK-IOMP5-LD-32: "-l[[DEFAULT_OPENMP_LIB:[^"]*]]"
|
2014-03-07 15:43:52 +08:00
|
|
|
// CHECK-IOMP5-LD-32: "-lpthread" "-lc"
|
2014-03-06 13:43:53 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -fopenmp -target x86_64-unknown-linux -rtlib=platform \
|
2014-03-06 13:43:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-64 %s
|
|
|
|
// CHECK-IOMP5-LD-64: "{{.*}}ld{{(.exe)?}}"
|
2017-03-08 17:07:33 +08:00
|
|
|
// CHECK-IOMP5-LD-64: "-l[[DEFAULT_OPENMP_LIB:[^"]*]]"
|
2014-03-07 15:43:52 +08:00
|
|
|
// CHECK-IOMP5-LD-64: "-lpthread" "-lc"
|
2014-03-06 13:43:53 +08:00
|
|
|
//
|
|
|
|
// 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 \
|
2015-05-20 12:24:19 +08:00
|
|
|
// RUN: -fopenmp -fopenmp=libgomp -target i386-unknown-linux \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -rtlib=platform \
|
2015-05-20 12:24:19 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-OVERRIDE-32 %s
|
|
|
|
// CHECK-LD-OVERRIDE-32: "{{.*}}ld{{(.exe)?}}"
|
2017-03-08 17:07:33 +08:00
|
|
|
// CHECK-LD-OVERRIDE-32: "-lgomp" "-lrt"
|
2015-05-20 12:24:19 +08:00
|
|
|
// CHECK-LD-OVERRIDE-32: "-lpthread" "-lc"
|
2014-03-06 13:43:53 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2015-05-20 12:24:19 +08:00
|
|
|
// RUN: -fopenmp -fopenmp=libgomp -target x86_64-unknown-linux \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -rtlib=platform \
|
2015-05-20 12:24:19 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-OVERRIDE-64 %s
|
|
|
|
// CHECK-LD-OVERRIDE-64: "{{.*}}ld{{(.exe)?}}"
|
2017-03-08 17:07:33 +08:00
|
|
|
// CHECK-LD-OVERRIDE-64: "-lgomp" "-lrt"
|
2015-05-20 12:24:19 +08:00
|
|
|
// CHECK-LD-OVERRIDE-64: "-lpthread" "-lc"
|
2014-03-06 13:43:53 +08:00
|
|
|
//
|
2015-08-19 12:49:01 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -fopenmp=libomp -target x86_64-msvc-win32 -rtlib=platform \
|
2015-08-19 12:49:01 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MSVC-LINK-64 %s
|
|
|
|
// CHECK-MSVC-LINK-64: link.exe
|
|
|
|
// CHECK-MSVC-LINK-64-SAME: -nodefaultlib:vcomp.lib
|
|
|
|
// CHECK-MSVC-LINK-64-SAME: -nodefaultlib:vcompd.lib
|
|
|
|
// CHECK-MSVC-LINK-64-SAME: -libpath:{{.+}}/../lib
|
|
|
|
// CHECK-MSVC-LINK-64-SAME: -defaultlib:libomp.lib
|
2017-12-30 01:36:15 +08:00
|
|
|
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target x86_64-msvc-win32 -rtlib=platform | FileCheck --check-prefix SIMD-ONLY11 %s
|
|
|
|
// SIMD-ONLY11-NOT: libiomp
|
|
|
|
// SIMD-ONLY11-NOT: libomp
|
|
|
|
// SIMD-ONLY11-NOT: libgomp
|
2015-08-19 12:49:01 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: -fopenmp=libiomp5 -target x86_64-msvc-win32 -rtlib=platform \
|
2015-08-19 12:49:01 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MSVC-ILINK-64 %s
|
2017-12-30 02:07:07 +08:00
|
|
|
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target x86_64-msvc-win32 -rtlib=platform | FileCheck --check-prefix SIMD-ONLY11 %s
|
|
|
|
// SIMD-ONLY11-NOT: libiomp
|
|
|
|
// SIMD-ONLY11-NOT: libomp
|
|
|
|
// SIMD-ONLY11-NOT: libgomp
|
2015-08-19 12:49:01 +08:00
|
|
|
// CHECK-MSVC-ILINK-64: link.exe
|
|
|
|
// CHECK-MSVC-ILINK-64-SAME: -nodefaultlib:vcomp.lib
|
|
|
|
// CHECK-MSVC-ILINK-64-SAME: -nodefaultlib:vcompd.lib
|
|
|
|
// CHECK-MSVC-ILINK-64-SAME: -libpath:{{.+}}/../lib
|
|
|
|
// CHECK-MSVC-ILINK-64-SAME: -defaultlib:libiomp5md.lib
|
|
|
|
//
|