1 // Test that -print-libgcc-file-name correctly respects -rtlib=compiler-rt.
2 
3 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
4 // RUN:     --target=x86_64-pc-linux \
5 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_arch_subdir \
6 // RUN:   | FileCheck --check-prefix=CHECK-CLANGRT-X8664 %s
7 // CHECK-CLANGRT-X8664: libclang_rt.builtins-x86_64.a
8 
9 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
10 // RUN:     --target=i386-pc-linux \
11 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_arch_subdir \
12 // RUN:   | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s
13 // CHECK-CLANGRT-I386: libclang_rt.builtins-i386.a
14 
15 // Check whether alternate arch values map to the correct library.
16 //
17 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
18 // RUN:     --target=i686-pc-linux \
19 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_arch_subdir \
20 // RUN:   | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s
21 
22 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
23 // RUN:     --target=arm-linux-gnueabi \
24 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_arch_subdir \
25 // RUN:   | FileCheck --check-prefix=CHECK-CLANGRT-ARM %s
26 // CHECK-CLANGRT-ARM: libclang_rt.builtins-arm.a
27 
28 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
29 // RUN:     --target=arm-linux-androideabi \
30 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_arch_subdir \
31 // RUN:   | FileCheck --check-prefix=CHECK-CLANGRT-ARM-ANDROID %s
32 // CHECK-CLANGRT-ARM-ANDROID: libclang_rt.builtins-arm-android.a
33 
34 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
35 // RUN:     --target=arm-linux-gnueabihf \
36 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_arch_subdir \
37 // RUN:   | FileCheck --check-prefix=CHECK-CLANGRT-ARMHF %s
38 // CHECK-CLANGRT-ARMHF: libclang_rt.builtins-armhf.a
39 
40 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
41 // RUN:     --target=arm-linux-gnueabi -mfloat-abi=hard \
42 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_arch_subdir \
43 // RUN:   | FileCheck --check-prefix=CHECK-CLANGRT-ARM-ABI %s
44 // CHECK-CLANGRT-ARM-ABI: libclang_rt.builtins-armhf.a
45 
46 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
47 // RUN:     --target=armv7m-none-eabi \
48 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_arch_subdir \
49 // RUN:   | FileCheck --check-prefix=CHECK-CLANGRT-ARM-BAREMETAL %s
50 // CHECK-CLANGRT-ARM-BAREMETAL: libclang_rt.builtins-armv7m.a
51