blob: 68b1e9fbe513a4a143896fc99e6e1d58a6f6d1fb [file] [log] [blame]
Richard Smithcceb4682016-04-18 23:12:59 +00001// RUN: rm -rf %t
2// RUN: mkdir %t
3//
Kuba Mracek5b576332017-08-15 19:47:06 +00004// RUN: env LIBRARY_PATH=%t/test1 %clang -x c %s -### 2>&1 | FileCheck %s
Chad Rosier616e8a52012-10-30 21:42:09 +00005// CHECK: "-L{{.*}}/test1"
NAKAMURA Takumie2355252012-03-16 05:31:24 +00006
7// GCC driver is used as linker on cygming. It should be aware of LIBRARY_PATH.
Petr Hosekeb46c952018-08-09 02:16:18 +00008// XFAIL: windows-msvc
NAKAMURA Takumi556d7132012-12-11 07:06:09 +00009// REQUIRES: clang-driver
Richard Barton5828d7b2013-12-17 11:11:25 +000010// REQUIRES: native
Bob Wilson9e6e0752014-07-29 20:17:52 +000011
12// Make sure that LIBRARY_PATH works for both i386 and x86_64 on Darwin.
Kuba Mracek5b576332017-08-15 19:47:06 +000013// RUN: env LIBRARY_PATH=%t/test1 %clang -target x86_64-apple-darwin %s -### 2>&1 | FileCheck %s
14// RUN: env LIBRARY_PATH=%t/test1 %clang -target i386-apple-darwin %s -### 2>&1 | FileCheck %s
Richard Smithcceb4682016-04-18 23:12:59 +000015//
16// Make sure that we don't warn on unused compiler arguments.
17// RUN: %clang -Xclang -I. -x c %s -c -o %t/tmp.o
18// RUN: %clang -Xclang -I. %t/tmp.o -o %t/tmp -### 2>&1 | FileCheck %s --check-prefix=NO-UNUSED
19// NO-UNUSED-NOT: warning:{{.*}}unused
20//
21// Make sure that we do warn in other cases.
22// RUN: %clang %s -lfoo -c -o %t/tmp2.o -### 2>&1 | FileCheck %s --check-prefix=UNUSED
23// UNUSED: warning:{{.*}}unused