1 // Test the output of -print-libgcc-file-name on Darwin.
7 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
8 // RUN: --target=x86_64-apple-macos \
9 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
10 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-MACOS %s
11 // CHECK-CLANGRT-MACOS: libclang_rt.osx.a
13 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
14 // RUN: --target=arm64-apple-ios \
15 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
16 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-IOS %s
17 // CHECK-CLANGRT-IOS: libclang_rt.ios.a
19 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
20 // RUN: --target=arm64-apple-watchos \
21 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
22 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-WATCHOS %s
23 // CHECK-CLANGRT-WATCHOS: libclang_rt.watchos.a
25 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
26 // RUN: --target=arm64-apple-tvos \
27 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
28 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-TVOS %s
29 // CHECK-CLANGRT-TVOS: libclang_rt.tvos.a
31 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
32 // RUN: --target=arm64-apple-driverkit \
33 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
34 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-DRIVERKIT %s
35 // CHECK-CLANGRT-DRIVERKIT: libclang_rt.driverkit.a
41 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
42 // RUN: --target=arm64-apple-ios-simulator \
43 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
44 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-IOS-SIMULATOR %s
45 // CHECK-CLANGRT-IOS-SIMULATOR: libclang_rt.iossim.a
47 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
48 // RUN: --target=arm64-apple-watchos-simulator \
49 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
50 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-WATCHOS-SIMULATOR %s
51 // CHECK-CLANGRT-WATCHOS-SIMULATOR: libclang_rt.watchossim.a
53 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
54 // RUN: --target=arm64-apple-tvos-simulator \
55 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
56 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-TVOS-SIMULATOR %s
57 // CHECK-CLANGRT-TVOS-SIMULATOR: libclang_rt.tvossim.a
59 // Check the sanitizer and profile variants
60 // While the driver also links in sanitizer-specific dylibs, the result of
61 // -print-libgcc-file-name is the path of the basic compiler-rt library.
63 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
64 // RUN: -fsanitize=address --target=x86_64-apple-macos \
65 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
66 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-MACOS-SAN %s
67 // CHECK-CLANGRT-MACOS-SAN: libclang_rt.osx.a
69 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
70 // RUN: -fsanitize=address --target=arm64-apple-ios \
71 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
72 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-IOS-SAN %s
73 // CHECK-CLANGRT-IOS-SAN: libclang_rt.ios.a
75 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
76 // RUN: -fsanitize=address --target=arm64-apple-watchos \
77 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
78 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-WATCHOS-SAN %s
79 // CHECK-CLANGRT-WATCHOS-SAN: libclang_rt.watchos.a
81 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
82 // RUN: -fsanitize=address --target=arm64-apple-tvos \
83 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
84 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-TVOS-SAN %s
85 // CHECK-CLANGRT-TVOS-SAN: libclang_rt.tvos.a
87 // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \
88 // RUN: -fsanitize=address --target=arm64-apple-driverkit \
89 // RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \
90 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-DRIVERKIT-SAN %s
91 // CHECK-CLANGRT-DRIVERKIT-SAN: libclang_rt.driverkit.a