2018-06-06 21:56:51 +08:00
|
|
|
# REQUIRES: x86
|
2017-09-13 15:28:03 +08:00
|
|
|
|
|
|
|
# RUN: yaml2obj < %p/Inputs/export.yaml > %t.archive.obj
|
2018-08-02 19:33:54 +08:00
|
|
|
# RUN: rm -f %t.archive.lib
|
2017-09-13 15:28:03 +08:00
|
|
|
# RUN: llvm-ar rcs %t.archive.lib %t.archive.obj
|
|
|
|
# RUN: llvm-mc -triple=x86_64-windows-msvc %s -filetype=obj -o %t.main.obj
|
|
|
|
|
|
|
|
# RUN: lld-link -dll -out:%t.dll -entry:main %t.main.obj -wholearchive:%t.archive.lib -implib:%t.lib
|
|
|
|
# RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
|
|
|
|
|
|
|
|
# RUN: lld-link -dll -out:%t.dll -entry:main %t.main.obj -wholearchive %t.archive.lib -implib:%t.lib
|
|
|
|
# RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
|
|
|
|
|
2018-06-13 05:47:31 +08:00
|
|
|
# RUN: lld-link -dll -out:%t.dll -entry:main %t.main.obj %t.archive.lib -wholearchive:%t.archive.lib -implib:%t.lib
|
|
|
|
# RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
|
|
|
|
|
|
|
|
# RUN: mkdir -p %t.dir
|
|
|
|
# RUN: cp %t.archive.lib %t.dir/foo.lib
|
2018-06-15 03:56:03 +08:00
|
|
|
# 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
|
2018-06-13 05:47:31 +08:00
|
|
|
# RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
|
|
|
|
|
2017-09-13 15:28:03 +08:00
|
|
|
# CHECK-IMPLIB: Symbol: __imp_exportfn3
|
|
|
|
# CHECK-IMPLIB: Symbol: exportfn3
|
|
|
|
|
|
|
|
.global main
|
|
|
|
.text
|
|
|
|
main:
|
|
|
|
ret
|