• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1MSVC's lib.exe produces archives with absolute paths to the members. It's useful
2for llvm-ar to extract them to their basename in the CWD, since usually the
3directories in the path in the archive won't exist during archive extraction.
4
5Get a temp clean cwd to extract into.
6RUN: rm -rf %t && mkdir %t && cd %t
7
8RUN: llvm-ar t %S/Inputs/absolute-paths.lib | FileCheck %s --check-prefix=CHECK-LIST
9CHECK-LIST: C:/src/llvm-project/build/dne/b.o
10CHECK-LIST: C:/src/llvm-project/build/dne/a.o
11
12Check that a.o comes out and defines foo.
13RUN: llvm-ar x %S/Inputs/absolute-paths.lib 'C:/src/llvm-project/build/dne/a.o'
14RUN: llvm-nm a.o | FileCheck %s --check-prefix=CHECK-A
15CHECK-A: T foo
16
17Check that b.o comes out and defines bar.
18RUN: llvm-ar x %S/Inputs/absolute-paths.lib C:/src/llvm-project/build/dne/b.o
19RUN: llvm-nm b.o | FileCheck %s --check-prefix=CHECK-B
20CHECK-B: T bar
21