4 # RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
5 # RUN: echo '_main@0' > %t.order
9 Test link.exe-style /linkrepro: flag.
10 # RUN: mkdir -p %t.dir/build1
11 # RUN: cd %t.dir/build1
12 # RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
13 # RUN: /entry:main@0 /linkrepro:. /out:%t.exe
14 # RUN: tar xf repro.tar
15 # RUN: diff %t.obj repro/%:t.obj
16 # RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib
17 # RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
19 Test lld-style /reproduce: flag.
20 # RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
21 # RUN: /entry:main@0 /reproduce:repro2.tar /out:%t.exe
22 # RUN: tar xf repro2.tar
23 # RUN: diff %t.obj repro2/%:t.obj
24 # RUN: diff %p/Inputs/std32.lib repro2/%:p/Inputs/std32.lib
25 # RUN: FileCheck %s --check-prefix=RSP < repro2/response.txt
27 Test LLD_REPRODUCE env var.
28 # RUN: mkdir -p %t.dir/build2
29 # RUN: cd %t.dir/build2
30 # RUN: env LLD_REPRODUCE=repro.tar lld-link %t.obj %p/Inputs/std32.lib \
31 # RUN: /subsystem:console /entry:main@0 /out:%t.exe
32 # RUN: tar xf repro.tar
33 # RUN: diff %t.obj repro/%:t.obj
34 # RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib
35 # RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
37 Test adding .lib files with /libpath: to repro archive,
38 and various other flags.
39 # RUN: mkdir -p %t.dir/build3
40 # RUN: cd %t.dir/build3
41 # RUN: lld-link %t.obj /libpath:%p/Inputs /defaultlib:std32 /subsystem:console \
42 # RUN: /entry:main@0 /linkrepro:. /out:%t.exe /order:@%t.order /def:%t.def
43 # RUN: tar tf repro.tar | FileCheck --check-prefix=LIST %s
44 # RUN: tar xf repro.tar
45 # RUN: diff %t.obj repro/%:t.obj
46 # RUN: diff %t.order repro/%:t.order
47 # RUN: diff %t.def repro/%:t.def
48 # RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib
49 # RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
50 # RUN: cd repro; lld-link @response.txt
52 Test adding .lib files with LIB env var to repro archive,
53 and various other flags.
54 # RUN: mkdir -p %t.dir/build4
55 # RUN: cd %t.dir/build4
56 # RUN: env LIB=%p/Inputs lld-link %t.obj /defaultlib:std32 /subsystem:console \
57 # RUN: /entry:main@0 /linkrepro:. /out:%t.exe /order:@%t.order /def:%t.def
58 # RUN: tar tf repro.tar | FileCheck --check-prefix=LIST %s
59 # RUN: tar xf repro.tar
60 # RUN: diff %t.obj repro/%:t.obj
61 # RUN: diff %t.order repro/%:t.order
62 # RUN: diff %t.def repro/%:t.def
63 # RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib
64 # RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
65 # RUN: cd repro; lld-link @response.txt
73 # RSP: /subsystem:console
78 # RSP: linkrepro.test.tmp.obj
82 Test /call-graph-ordering-file (can't be used with /order:, needs separate test)
83 # RUN: mkdir -p %t.dir/build5
84 # RUN: cd %t.dir/build5
85 # RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
86 # RUN: /entry:main@0 /linkrepro:. /out:%t.exe /call-graph-ordering-file:%t.cg
87 # RUN: tar tf repro.tar | FileCheck --check-prefix=LISTCG %s
88 # RUN: tar xf repro.tar
89 # RUN: diff %t.obj repro/%:t.obj
90 # RUN: diff %t.cg repro/%:t.cg
91 # RUN: FileCheck %s --check-prefix=RSPCG < repro/response.txt
92 # RUN: cd repro; lld-link @response.txt
95 # LISTCG: response.txt
98 # RSPCG-NOT: /call-graph-ordering-file:/