2 RUN: split-file %s %t.dir && cd %t.dir
4 RUN: llvm-mc -filetype=obj -triple=x86_64-windows chain-bad.s -o chain-bad.obj
5 RUN: llvm-mc -filetype=obj -triple=x86_64-windows chain-bad2.s -o chain-bad2.obj
6 RUN: llvm-mc -filetype=obj -triple=x86_64-windows globals-bad.s -o globals-bad.obj
7 RUN: llvm-mc -filetype=obj -triple=x86_64-windows chain-good.s -o chain-good.obj
8 RUN: llvm-mc -filetype=obj -triple=x86_64-windows chain-good2.s -o chain-good2.obj
9 RUN: llvm-mc -filetype=obj -triple=x86_64-windows globals-good.s -o globals-good.obj
11 Temporary anti-dependency chains are allowed as long as they are broken by non-alias symbols.
13 RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll chain-good.obj globals-good.obj
14 RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll chain-good2.obj globals-good.obj
16 Chaining of anti-dependency symbols is not allowed.
18 RUN: not lld-link -machine:amd64 -dll -noentry -out:test.dll chain-bad.obj globals-bad.obj 2>&1 \
19 RUN: | FileCheck -check-prefix=ANTIDEP %s
20 RUN: not lld-link -machine:amd64 -dll -noentry -out:test.dll chain-bad2.obj globals-bad.obj 2>&1 \
21 RUN: | FileCheck -check-prefix=ANTIDEP %s
23 ANTIDEP: lld-link: error: undefined symbol: sym
24 ANTIDEP-NEXT: >>> referenced by chain-bad