1 // Test instrumented profiling ld flags. 2 // 3 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 4 // RUN: -target i386-unknown-linux -fprofile-instr-generate \ 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 -fprofile-instr-generate \ 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 -fprofile-instr-generate \ 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: -shared \ 32 // RUN: -target i386-unknown-linux -fprofile-instr-generate \ 33 // RUN: -resource-dir=%S/Inputs/resource_dir \ 34 // RUN: --sysroot=%S/Inputs/basic_linux_tree \ 35 // RUN: | FileCheck --check-prefix=CHECK-LINUX-I386-SHARED %s 36 // 37 // CHECK-LINUX-I386-SHARED: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}" 38 // CHECK-LINUX-I386-SHARED: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-pic-i386.a" {{.*}} "-lc" 39 // 40 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 41 // RUN: -shared \ 42 // RUN: -target x86_64-unknown-linux -fprofile-instr-generate \ 43 // RUN: -resource-dir=%S/Inputs/resource_dir \ 44 // RUN: --sysroot=%S/Inputs/basic_linux_tree \ 45 // RUN: | FileCheck --check-prefix=CHECK-LINUX-X86-64-SHARED %s 46 // 47 // CHECK-LINUX-X86-64-SHARED: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}" 48 // CHECK-LINUX-X86-64-SHARED: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-pic-x86_64.a" {{.*}} "-lc" 49 // 50 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 51 // RUN: -shared \ 52 // RUN: -target x86_64-unknown-freebsd -fprofile-instr-generate \ 53 // RUN: -resource-dir=%S/Inputs/resource_dir \ 54 // RUN: --sysroot=%S/Inputs/basic_freebsd64_tree \ 55 // RUN: | FileCheck --check-prefix=CHECK-FREEBSD-X86-64-SHARED %s 56 // 57 // CHECK-FREEBSD-X86-64-SHARED: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}" 58 // CHECK-FREEBSD-X86-64-SHARED: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}freebsd{{/|\\\\}}libclang_rt.profile-pic-x86_64.a" 59