Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / print-libgcc-file-name-clangrt.c
blob19f9a3c28c31b9ef55d744688af2d072ec055c2d
1 // Test that -print-libgcc-file-name correctly respects -rtlib=compiler-rt.
3 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
4 // RUN: --target=x86_64-pc-linux \
5 // RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
6 // RUN: -resource-dir=%S/Inputs/resource_dir_with_arch_subdir 2>&1 \
7 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-X8664 %s
8 // CHECK-CLANGRT-X8664: libclang_rt.builtins-x86_64.a
10 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
11 // RUN: --target=i386-pc-linux \
12 // RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
13 // RUN: -resource-dir=%S/Inputs/resource_dir_with_arch_subdir 2>&1 \
14 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s
15 // CHECK-CLANGRT-I386: libclang_rt.builtins-i386.a
17 // Check whether alternate arch values map to the correct library.
19 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
20 // RUN: --target=i686-pc-linux \
21 // RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
22 // RUN: -resource-dir=%S/Inputs/resource_dir_with_arch_subdir 2>&1 \
23 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s
25 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
26 // RUN: --target=arm-linux-gnueabi \
27 // RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
28 // RUN: -resource-dir=%S/Inputs/resource_dir_with_arch_subdir 2>&1 \
29 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-ARM %s
30 // CHECK-CLANGRT-ARM: libclang_rt.builtins-arm.a
32 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
33 // RUN: --target=arm-linux-androideabi \
34 // RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
35 // RUN: -resource-dir=%S/Inputs/resource_dir_with_arch_subdir 2>&1 \
36 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-ARM-ANDROID %s
37 // CHECK-CLANGRT-ARM-ANDROID: libclang_rt.builtins-arm-android.a
39 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
40 // RUN: --target=arm-linux-gnueabihf \
41 // RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
42 // RUN: -resource-dir=%S/Inputs/resource_dir_with_arch_subdir 2>&1 \
43 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-ARMHF %s
44 // CHECK-CLANGRT-ARMHF: libclang_rt.builtins-armhf.a
46 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
47 // RUN: --target=arm-linux-gnueabi -mfloat-abi=hard \
48 // RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
49 // RUN: -resource-dir=%S/Inputs/resource_dir_with_arch_subdir 2>&1 \
50 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-ARM-ABI %s
51 // CHECK-CLANGRT-ARM-ABI: libclang_rt.builtins-armhf.a
53 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
54 // RUN: --target=armv7m-none-eabi \
55 // RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
56 // RUN: -resource-dir=%S/Inputs/resource_dir_with_arch_subdir 2>&1 \
57 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-ARM-BAREMETAL %s
58 // CHECK-CLANGRT-ARM-BAREMETAL: libclang_rt.builtins-armv7m.a
60 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
61 // RUN: --target=armv7m-vendor-none-eabi \
62 // RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
63 // RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir 2>&1 \
64 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-ARM-BAREMETAL-PER-TARGET %s
65 // CHECK-CLANGRT-ARM-BAREMETAL-PER-TARGET: libclang_rt.builtins.a