1llvm-lib should behave like "link.exe /lib" and use relative paths to describe
2archive members.
3
4First, get in a clean working directory.
5RUN: rm -rf %t && mkdir -p %t && cd %t
6
7Make foo/a.obj and foo/b.obj.
8RUN: mkdir foo
9RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o foo/a.obj %S/Inputs/a.s
10RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o foo/b.obj %S/Inputs/b.s
11
12RUN: llvm-lib -out:foo.lib foo/a.obj foo/b.obj
13RUN: llvm-ar t foo.lib | FileCheck %s
14
15FIXME: We should probably use backslashes on Windows to better match MSVC tools.
16CHECK: foo/a.obj
17CHECK: foo/b.obj
18
19Do it again with absolute paths and see that we get something.
20RUN: llvm-lib -out:foo.lib %t/foo/a.obj %t/foo/b.obj
21RUN: llvm-ar t foo.lib | FileCheck %s --check-prefix=ABS
22
23ABS: {{.*}}/foo/a.obj
24ABS: {{.*}}/foo/b.obj
25