xref: /llvm-project/clang/test/Driver/darwin-print-file-name.c (revision 1971823ecb9eaa077554a5d268a44c7cb75eccce)
1*1971823eSDan Liew // Regression test. Previously Clang just returned the library name instead
2*1971823eSDan Liew // of the full path.
3*1971823eSDan Liew 
4*1971823eSDan Liew // RUN: %clang -print-file-name=libclang_rt.osx.a --target=x86_64-apple-darwin20.3.0 \
5*1971823eSDan Liew // RUN:        -resource-dir=%S/Inputs/resource_dir \
6*1971823eSDan Liew // RUN:      | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
7*1971823eSDan Liew 
8*1971823eSDan Liew // RUN: %clang -print-file-name=libclang_rt.osx.a --target=x86_64-apple-macosx11.0.0 \
9*1971823eSDan Liew // RUN:        -resource-dir=%S/Inputs/resource_dir \
10*1971823eSDan Liew // RUN:      | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
11*1971823eSDan Liew 
12*1971823eSDan Liew // PRINT-RUNTIME-DIR: lib{{/|\\}}darwin{{/|\\}}libclang_rt.osx.a
13*1971823eSDan Liew 
14*1971823eSDan Liew // RUN: %clang -print-file-name=libclang_rt.ios.a --target=arm64-apple-ios14.0.0 \
15*1971823eSDan Liew // RUN:        -resource-dir=%S/Inputs/resource_dir \
16*1971823eSDan Liew // RUN:      | FileCheck --check-prefix=PRINT-RUNTIME-DIR-IOS %s
17*1971823eSDan Liew // PRINT-RUNTIME-DIR-IOS: lib{{/|\\}}darwin{{/|\\}}libclang_rt.ios.a
18*1971823eSDan Liew 
19*1971823eSDan Liew // RUN: %clang -print-file-name=libclang_rt.tvos.a --target=arm64-apple-tvos14.0.0 \
20*1971823eSDan Liew // RUN:        -resource-dir=%S/Inputs/resource_dir \
21*1971823eSDan Liew // RUN:      | FileCheck --check-prefix=PRINT-RUNTIME-DIR-TVOS %s
22*1971823eSDan Liew // PRINT-RUNTIME-DIR-TVOS: lib{{/|\\}}darwin{{/|\\}}libclang_rt.tvos.a
23*1971823eSDan Liew 
24*1971823eSDan Liew // RUN: %clang -print-file-name=libclang_rt.watchos.a --target=arm64-apple-watchos5.0.0 \
25*1971823eSDan Liew // RUN:        -resource-dir=%S/Inputs/resource_dir \
26*1971823eSDan Liew // RUN:      | FileCheck --check-prefix=PRINT-RUNTIME-DIR-WATCHOS %s
27*1971823eSDan Liew // PRINT-RUNTIME-DIR-WATCHOS: lib{{/|\\}}darwin{{/|\\}}libclang_rt.watchos.a
28