summaryrefslogtreecommitdiff
path: root/test/MinGW/lib.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/MinGW/lib.test')
-rw-r--r--test/MinGW/lib.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/MinGW/lib.test b/test/MinGW/lib.test
new file mode 100644
index 0000000000000..56104d6d907a2
--- /dev/null
+++ b/test/MinGW/lib.test
@@ -0,0 +1,21 @@
+RUN: rm -rf %t/lib
+RUN: mkdir -p %t/lib
+RUN: not ld.lld -### -m i386pep -lfoo -L%t/lib 2>&1 | FileCheck -check-prefix=LIB1 %s
+LIB1: unable to find library -lfoo
+
+RUN: echo > %t/lib/libfoo.dll.a
+RUN: ld.lld -### -m i386pep -lfoo -L%t/lib | FileCheck -check-prefix=LIB2 %s
+LIB2: libfoo.dll.a
+
+RUN: not ld.lld -### -m i386pep -Bstatic -lfoo -L%t/lib 2>&1 | FileCheck -check-prefix=LIB3 %s
+LIB3: unable to find library -lfoo
+
+RUN: echo > %t/lib/libfoo.a
+RUN: ld.lld -### -m i386pep -Bstatic -lfoo -L%t/lib | FileCheck -check-prefix=LIB4 %s
+LIB4: libfoo.a
+
+RUN: echo > %t/lib/libbar.dll.a
+RUN: echo > %t/lib/libbar.a
+RUN: ld.lld -### -m i386pep -Bstatic -lfoo -Bdynamic -lbar -L%t/lib | FileCheck -check-prefix=LIB5 %s
+LIB5: libfoo.a
+LIB5-SAME: libbar.dll.a