Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / wrap-with-archive.s
blob96b244a65a45c9eaf4e7c30970d6ccdd4be0375d
1 // REQUIRES: x86
2 // RUN: split-file %s %t.dir
3 // RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/main.s -o %t.main.obj
4 // RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/wrap.s -o %t.wrap.obj
5 // RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/other.s -o %t.other.obj
6 // RUN: rm -f %t.lib
7 // RUN: llvm-ar rcs %t.lib %t.wrap.obj %t.other.obj
9 // RUN: lld-link -out:%t.exe %t.main.obj -libpath:%T %t.lib -entry:entry -subsystem:console -wrap:foo
11 // Note: No real definition of foo exists here, but that works fine as long
12 // as there's no actual references to __real_foo.
14 #--- main.s
15 .global entry
16 entry:
17 call foo
18 ret
20 #--- wrap.s
21 .global __wrap_foo
22 __wrap_foo:
23 call other_func
24 ret
26 #--- other.s
27 .global other_func
28 other_func:
29 ret