xref: /minix3/external/bsd/llvm/dist/clang/test/Driver/coverage-ld.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // Test coverage ld flags.
2f4a2713aSLionel Sambuc //
3f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
4f4a2713aSLionel Sambuc // RUN:     -target i386-unknown-linux --coverage \
5f4a2713aSLionel Sambuc // RUN:     -resource-dir=%S/Inputs/resource_dir \
6f4a2713aSLionel Sambuc // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
7f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-LINUX-I386 %s
8f4a2713aSLionel Sambuc //
9f4a2713aSLionel Sambuc // CHECK-LINUX-I386: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
10f4a2713aSLionel Sambuc // CHECK-LINUX-I386: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-i386.a" {{.*}} "-lc"
11f4a2713aSLionel Sambuc //
12f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
13f4a2713aSLionel Sambuc // RUN:     -target x86_64-unknown-linux --coverage \
14f4a2713aSLionel Sambuc // RUN:     -resource-dir=%S/Inputs/resource_dir \
15f4a2713aSLionel Sambuc // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
16f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-LINUX-X86-64 %s
17f4a2713aSLionel Sambuc //
18f4a2713aSLionel Sambuc // CHECK-LINUX-X86-64: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
19f4a2713aSLionel Sambuc // CHECK-LINUX-X86-64: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-x86_64.a" {{.*}} "-lc"
20*0a6a1f1dSLionel Sambuc //
21*0a6a1f1dSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
22*0a6a1f1dSLionel Sambuc // RUN:     -target x86_64-unknown-freebsd --coverage \
23*0a6a1f1dSLionel Sambuc // RUN:     -resource-dir=%S/Inputs/resource_dir \
24*0a6a1f1dSLionel Sambuc // RUN:     --sysroot=%S/Inputs/basic_freebsd64_tree \
25*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-FREEBSD-X86-64 %s
26*0a6a1f1dSLionel Sambuc //
27*0a6a1f1dSLionel Sambuc // CHECK-FREEBSD-X86-64: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
28*0a6a1f1dSLionel Sambuc // CHECK-FREEBSD-X86-64: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}freebsd{{/|\\\\}}libclang_rt.profile-x86_64.a"
29