2 RUN: split-file %s %t.dir && cd %t.dir
4 RUN: llvm-mc -filetype=obj -triple=x86_64-windows test.s -o test.obj
5 RUN: llvm-mc -filetype=obj -triple=x86_64-windows sym2.s -o sym2.obj
6 RUN: llvm-mc -filetype=obj -triple=x86_64-windows def.s -o def.obj
8 RUN: not lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj sym2.obj 2>&1 | FileCheck -check-prefix=ERR %s
10 ERR: error: undefined symbol: testsym
11 ERR-NEXT: >>> referenced by test.obj
13 ERR-NEXT: error: undefined symbol: sym1
14 ERR-NEXT: >>> referenced by test.obj
15 ERR-NEXT: >>> referenced by sym2.obj
17 ERR-NEXT: error: undefined symbol: sym2
18 ERR-NEXT: >>> referenced by test.obj
19 ERR-NEXT: >>> referenced by sym2.obj
21 Depending on symbol processing order, we may have temporary weak reference cycles:
23 RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj sym2.obj def.obj
24 RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj def.obj sym2.obj
25 RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll def.obj test.obj sym2.obj