Jacek Caban bacc7aebb9 [Object] Use COFF archive format for import libraries.
This is similar to D143540 for import libraries. ARM64EC will need it
for EC symbol table, but it should be fine for other targets as well
and it improves MSVC compatibility. I left mingw case unchanged to be
safe, although I think that it wouldn't hurt to change that as well.

The visible effect in tests is a sorted symbol map.

Revieved By: mstorsjo
Differential Revision: https://reviews.llvm.org/D156473
2023-07-28 14:20:15 +02:00

25 lines
762 B
Plaintext

Test that import libraries (and the members thereof) can be added to another
static library.
RUN: rm -rf %t
RUN: mkdir -p %t
RUN: echo -e "EXPORTS\nMyFunc" > %t/lib.def
RUN: llvm-dlltool -m i386:x86-64 -l %t/lib.lib -d %t/lib.def -D lib.dll
RUN: llvm-lib -out:%t/newlib.lib %t/lib.lib
RUN: llvm-ar t %t/newlib.lib | FileCheck %s
CHECK: lib.dll
Test that import libraries can be created from a def file
RUN: echo -e "NAME lib.dll\nEXPORTS\nMyFunc\nAnotherFunc" > %t/implib.def
RUN: llvm-lib -out:%t/implib.lib -def:%t/implib.def -machine:x64
RUN: llvm-ar t %t/implib.lib | FileCheck %s
RUN: llvm-nm --print-armap %t/implib.lib | FileCheck --check-prefix=SYMTAB %s
SYMTAB: Archive map
SYMTAB-NEXT: AnotherFunc in lib.dll
SYMTAB-NEXT: MyFunc in lib.dll