50 lines · plain
1// REQUIRES: x862// RUN: split-file %s %t.dir3 4// RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/main.s -o %t.main.o5// RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/lib1.s -o %t.lib1.o6// RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/lib2.s -o %t.lib2.o7 8// RUN: rm -f %t.lib.a9// RUN: llvm-ar cru %t.lib.a %t.lib1.o %t.lib2.o10// RUN: lld-link -dll -out:%t-1.dll -entry:entry %t.main.o %t.lib.a11// RUN: lld-link -dll -out:%t-2.dll -entry:entry %t.main.o %t.lib.a -includeoptional:libfunc12 13// RUN: llvm-readobj --coff-exports %t-1.dll | FileCheck --implicit-check-not=Name: %s --check-prefix=CHECK-DEFAULT14// RUN: llvm-readobj --coff-exports %t-2.dll | FileCheck --implicit-check-not=Name: %s --check-prefix=CHECK-INCLUDEOPTIONAL15 16// CHECK-DEFAULT: Name: myfunc17 18// CHECK-INCLUDEOPTIONAL: Name: libfunc19// CHECK-INCLUDEOPTIONAL: Name: myfunc20// CHECK-INCLUDEOPTIONAL: Name: otherlibfunc21 22#--- main.s23.global entry24entry:25 ret26 27.global myfunc28myfunc:29 ret30 31.section .drectve32.ascii "-export:myfunc "33 34#--- lib1.s35.global libfunc36libfunc:37 call otherlibfunc38 ret39 40.section .drectve41.ascii "-export:libfunc "42 43#--- lib2.s44.global otherlibfunc45otherlibfunc:46 ret47 48.section .drectve49.ascii "-export:otherlibfunc "50