[clang-tidy][use-internal-linkage]fix false positives for global overloaded operator...
[llvm-project.git] / lld / test / COFF / wholearchive.s
blobe587a45244b93dae221b963b2a40eac340ca89e6
1 # REQUIRES: x86
3 # RUN: yaml2obj %p/Inputs/export.yaml -o %t.archive.obj
4 # RUN: rm -f %t.archive.lib
5 # RUN: llvm-ar rcs %t.archive.lib %t.archive.obj
6 # RUN: llvm-mc -triple=x86_64-windows-msvc %s -filetype=obj -o %t.main.obj
8 # RUN: lld-link -dll -out:%t.dll -entry:main %t.main.obj -wholearchive:%t.archive.lib -implib:%t.lib
9 # RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
11 # RUN: lld-link -dll -out:%t.dll -entry:main %t.main.obj -wholearchive %t.archive.lib -implib:%t.lib
12 # RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
14 # RUN: lld-link -dll -out:%t.dll -entry:main %t.main.obj %t.archive.lib -wholearchive:%t.archive.lib -implib:%t.lib
15 # RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
17 # PR43744: Test no inputs except a whole archive.
18 # RUN: lld-link -dll -out:%t.dll -noentry -wholearchive:%t.archive.lib -implib:%t.lib
19 # RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
21 # RUN: mkdir -p %t.dir
22 # RUN: cp %t.archive.lib %t.dir/foo.lib
23 # RUN: lld-link -dll -out:%t.dll -entry:main -libpath:%t.dir %t.main.obj %t.dir/./foo.lib -wholearchive:foo.lib -implib:%t.lib
24 # RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
26 # CHECK-IMPLIB: Symbol: __imp_exportfn3
27 # CHECK-IMPLIB: Symbol: exportfn3
29 .global main
30 .text
31 main:
32 ret