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