1 // Test coverage ld flags.
2 //
3 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
4 // RUN:     -target i386-unknown-linux --coverage \
5 // RUN:     -resource-dir=%S/Inputs/resource_dir \
6 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
7 // RUN:   | FileCheck --check-prefix=CHECK-LINUX-I386 %s
8 //
9 // CHECK-LINUX-I386: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
10 // CHECK-LINUX-I386: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-i386.a" {{.*}} "-lc"
11 //
12 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
13 // RUN:     -target x86_64-unknown-linux --coverage \
14 // RUN:     -resource-dir=%S/Inputs/resource_dir \
15 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
16 // RUN:   | FileCheck --check-prefix=CHECK-LINUX-X86-64 %s
17 //
18 // CHECK-LINUX-X86-64: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
19 // CHECK-LINUX-X86-64: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-x86_64.a" {{.*}} "-lc"
20 //
21 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
22 // RUN:     -target x86_64-unknown-freebsd --coverage \
23 // RUN:     -resource-dir=%S/Inputs/resource_dir \
24 // RUN:     --sysroot=%S/Inputs/basic_freebsd64_tree \
25 // RUN:   | FileCheck --check-prefix=CHECK-FREEBSD-X86-64 %s
26 //
27 // CHECK-FREEBSD-X86-64: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
28 // CHECK-FREEBSD-X86-64: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}freebsd{{/|\\\\}}libclang_rt.profile-x86_64.a"
29 //
30 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
31 // RUN:     -target arm-linux-androideabi --coverage \
32 // RUN:     -resource-dir=%S/Inputs/resource_dir \
33 // RUN:     --sysroot=%S/Inputs/basic_android_tree/sysroot \
34 // RUN:   | FileCheck --check-prefix=CHECK-ANDROID-ARM %s
35 //
36 // CHECK-ANDROID-ARM: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
37 // CHECK-ANDROID-ARM: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-arm-android.a"
38