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
|
|
|
//
|
|
|
|
// 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)?}}"
|
2015-05-20 12:24:19 +08:00
|
|
|
// CHECK-LD-32: "-liomp5" "-lgcc"
|
2013-01-17 21:19:29 +08:00
|
|
|
// 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)?}}"
|
2015-05-20 12:24:19 +08:00
|
|
|
// CHECK-LD-64: "-liomp5" "-lgcc"
|
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 \
|
|
|
|
// 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 \
|
2015-05-20 12:24:19 +08:00
|
|
|
// RUN: -fopenmp -target i386-unknown-linux \
|
2014-03-06 13:43:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-32 %s
|
|
|
|
// CHECK-IOMP5-LD-32: "{{.*}}ld{{(.exe)?}}"
|
2014-03-07 15:43:52 +08:00
|
|
|
// CHECK-IOMP5-LD-32: "-liomp5" "-lgcc"
|
|
|
|
// 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 \
|
2015-05-20 12:24:19 +08:00
|
|
|
// RUN: -fopenmp -target x86_64-unknown-linux \
|
2014-03-06 13:43:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-64 %s
|
|
|
|
// CHECK-IOMP5-LD-64: "{{.*}}ld{{(.exe)?}}"
|
2014-03-07 15:43:52 +08:00
|
|
|
// CHECK-IOMP5-LD-64: "-liomp5" "-lgcc"
|
|
|
|
// 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 \
|
|
|
|
// 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"
|
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 \
|
|
|
|
// 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"
|
2014-03-06 13:43:53 +08:00
|
|
|
//
|