Skip to content

Commit f4c1ec0

Browse files
committed
[lld][WebAssembly] Implement various thinlto flags
The changes in this PR (both in the code and the tests) are largely copied directly from the ELF linker. Parial fix for #79604.
1 parent 51628fa commit f4c1ec0

12 files changed

+438
-58
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
2+
target triple = "wasm32-unknown-unknown"

lld/test/wasm/lto/obj-path.ll

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
;; Copied from testr/ELF/lto/obj-path.ll
2+
;; Test --lto-obj-path= for regular LTO.
3+
4+
; RUN: rm -rf %t && split-file %s %t && cd %t
5+
; RUN: mkdir d
6+
; RUN: opt 1.ll -o 1.bc
7+
; RUN: opt 2.ll -o d/2.bc
8+
9+
; RUN: rm -f objpath.o
10+
; RUN: wasm-ld --lto-obj-path=objpath.o -shared 1.bc d/2.bc -o 3
11+
; RUN: llvm-nm 3 | FileCheck %s --check-prefix=NM
12+
; RUN: llvm-objdump -d objpath.o | FileCheck %s
13+
; RUN: ls 3* objpath* | count 2
14+
15+
; RUN: rm -f 3 objpath.o
16+
; RUN: wasm-ld --thinlto-index-only=3.txt --lto-obj-path=objpath.o -shared 1.bc d/2.bc -o 3
17+
; RUN: llvm-objdump -d objpath.o | FileCheck %s
18+
; RUN: not ls 3
19+
20+
; NM: T f
21+
; NM: T g
22+
23+
; CHECK: file format wasm
24+
; CHECK: <f>:
25+
; CHECK: <g>:
26+
27+
;; Test --lto-obj-path= for ThinLTO.
28+
; RUN: opt -module-summary 1.ll -o 1.bc
29+
; RUN: opt -module-summary 2.ll -o d/2.bc
30+
31+
; RUN: wasm-ld --lto-obj-path=objpath.o -shared 1.bc d/2.bc -o 3
32+
; RUN: llvm-nm 3 | FileCheck %s --check-prefix=NM3
33+
; RUN: llvm-objdump -d objpath.o1 | FileCheck %s --check-prefix=CHECK1
34+
; RUN: llvm-objdump -d objpath.o2 | FileCheck %s --check-prefix=CHECK2
35+
36+
; NM3: T f
37+
; NM3-NEXT: T g
38+
39+
; CHECK1: file format wasm
40+
; CHECK1-EMPTY:
41+
; CHECK1-NEXT: Disassembly of section CODE:
42+
; CHECK1: <f>:
43+
; CHECK1-EMPTY:
44+
; CHECK1-NEXT: end
45+
; CHECK1-NOT: {{.}}
46+
47+
; CHECK2: file format wasm
48+
; CHECK2-EMPTY:
49+
; CHECK2-NEXT: Disassembly of section CODE:
50+
; CHECK2: <g>:
51+
; CHECK2-EMPTY:
52+
; CHECK2-NEXT: end
53+
; CHECK2-NOT: {{.}}
54+
55+
;; With --thinlto-index-only, --lto-obj-path= creates just one file.
56+
; RUN: rm -f objpath.o objpath.o1 objpath.o2
57+
; RUN: wasm-ld --thinlto-index-only --lto-obj-path=objpath.o -shared 1.bc d/2.bc -o /dev/null
58+
; RUN: llvm-objdump -d objpath.o | FileCheck %s --check-prefix=EMPTY
59+
; RUN: not ls objpath.o1
60+
; RUN: not ls objpath.o2
61+
62+
;; Ensure lld emits empty combined module if specific obj-path.
63+
; RUN: mkdir obj
64+
; RUN: wasm-ld --lto-obj-path=objpath.o -shared 1.bc d/2.bc -o obj/out --save-temps
65+
; RUN: ls obj/out.lto.o out.lto.1.o d/out.lto.2.o
66+
67+
;; Ensure lld does not emit empty combined module by default.
68+
; RUN: rm -fr obj && mkdir obj
69+
; RUN: wasm-ld -shared 1.bc d/2.bc -o obj/out --save-temps
70+
; RUN: not test -e obj/out.lto.o
71+
72+
; EMPTY: file format wasm
73+
; EMPTY-NOT: {{.}}
74+
75+
;--- 1.ll
76+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
77+
target triple = "wasm32-unknown-unknown"
78+
79+
declare void @g(...)
80+
81+
define void @f() {
82+
entry:
83+
call void (...) @g()
84+
ret void
85+
}
86+
87+
;--- 2.ll
88+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
89+
target triple = "wasm32-unknown-unknown"
90+
91+
define void @g() {
92+
entry:
93+
ret void
94+
}

lld/test/wasm/lto/parallel.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
; RUN: llvm-as -o %t.bc %s
2-
; RUN: rm -f %t.lto.o %t1.lto.o
3-
; RUN: wasm-ld --lto-partitions=2 -save-temps -o %t %t.bc -r
4-
; RUN: llvm-nm %t.lto.o | FileCheck --check-prefix=CHECK0 %s
5-
; RUN: llvm-nm %t1.lto.o | FileCheck --check-prefix=CHECK1 %s
1+
; RUN: rm -rf %t && mkdir %t && cd %t
2+
; RUN: llvm-as -o a.bc %s
3+
; RUN: wasm-ld --lto-partitions=2 -save-temps -o out a.bc -r
4+
; RUN: llvm-nm out.lto.o | FileCheck --check-prefix=CHECK0 %s
5+
; RUN: llvm-nm out.lto.1.o | FileCheck --check-prefix=CHECK1 %s
66

77
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
88
target triple = "wasm32-unknown-unknown-wasm"
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
; REQUIRES: x86
2+
; RUN: rm -rf %t && split-file %s %t && cd %t
3+
; RUN: mkdir d
4+
5+
;; First ensure that the ThinLTO handling in lld handles
6+
;; bitcode without summary sections gracefully and generates index file.
7+
; RUN: llvm-as 1.ll -o 1.o
8+
; RUN: llvm-as %p/Inputs/thinlto.ll -o d/2.o
9+
; RUN: wasm-ld --thinlto-index-only -shared 1.o d/2.o -o 3
10+
; RUN: ls d/2.o.thinlto.bc
11+
; RUN: not test -e 3
12+
; RUN: wasm-ld -shared 1.o d/2.o -o 3
13+
; RUN: llvm-nm 3 | FileCheck %s --check-prefix=NM
14+
15+
;; Basic ThinLTO tests.
16+
; RUN: llvm-as 0.ll -o 0.o
17+
; RUN: opt -module-summary 1.ll -o 1.o
18+
; RUN: opt -module-summary %p/Inputs/thinlto.ll -o d/2.o
19+
; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o 3.o
20+
; RUN: cp 3.o 4.o
21+
22+
;; Ensure lld doesn't generates index files when --thinlto-index-only is not enabled.
23+
; RUN: rm -f 1.o.thinlto.bc d/2.o.thinlto.bc
24+
; RUN: wasm-ld -shared 1.o d/2.o -o /dev/null
25+
; RUN: not ls 1.o.thinlto.bc
26+
; RUN: not ls d/2.o.thinlto.bc
27+
28+
;; Ensure lld generates an index and not a binary if requested.
29+
; RUN: wasm-ld --thinlto-index-only -shared 1.o --start-lib d/2.o 3.o --end-lib 4.o -o 4
30+
; RUN: not test -e 4
31+
; RUN: llvm-bcanalyzer -dump 1.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND1
32+
; RUN: llvm-bcanalyzer -dump d/2.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND2
33+
; RUN: llvm-dis < 3.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND3
34+
; RUN: llvm-dis < 4.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND4
35+
36+
; RUN: rm -f 1.o.thinlto.bc d/2.o.thinlto.bc 3.o.thinlto.bc 4.o.thinlto.bc
37+
; RUN: wasm-ld --thinlto-index-only=4.txt --thinlto-emit-imports-files -shared 1.o --start-lib d/2.o 3.o --end-lib 4.o -o 4
38+
; RUN: not test -e 4
39+
; RUN: FileCheck %s --check-prefix=RSP --implicit-check-not={{.}} < 4.txt
40+
; RUN: llvm-bcanalyzer -dump 1.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND1
41+
; RUN: llvm-bcanalyzer -dump d/2.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND2
42+
; RUN: llvm-dis < 3.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND3
43+
; RUN: llvm-dis < 4.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND4
44+
; RUN: FileCheck %s --check-prefix=IMPORTS1 --implicit-check-not={{.}} < 1.o.imports
45+
; RUN: count 0 < d/2.o.imports
46+
;; Test that LLD generates an empty index even for lazy object file that is not added to link.
47+
; RUN: count 0 < 3.o.imports
48+
; RUN: count 0 < 4.o.imports
49+
50+
;; Test interaction with --save-temps.
51+
; RUN: rm -f 4.txt 1.o.thinlto.bc d/2.o.thinlto.bc 3.o.thinlto.bc 4.o.thinlto.bc
52+
; RUN: wasm-ld --thinlto-index-only=4.txt --thinlto-emit-imports-files --save-temps -shared 0.o 1.o --start-lib d/2.o 3.o --end-lib 4.o -o t
53+
; RUN: not test -e 4
54+
; RUN: FileCheck %s --check-prefix=RSP --implicit-check-not={{.}} < 4.txt
55+
; RUN: llvm-bcanalyzer -dump 1.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND1
56+
; RUN: FileCheck %s --check-prefix=IMPORTS1 --implicit-check-not={{.}} < 1.o.imports
57+
; RUN: FileCheck %s --check-prefix=RESOLUTION < t.resolution.txt
58+
; RUN: llvm-dis < t.index.bc | FileCheck %s --check-prefix=INDEX-BC
59+
60+
; RSP: 1.o
61+
; RSP-NEXT: d/2.o
62+
; RSP-NEXT: 4.o
63+
64+
; IMPORTS1: d/2.o
65+
66+
; RESOLUTION: 0.o
67+
; RESOLUTION-NEXT: -r=0.o,foo,px
68+
; RESOLUTION-NEXT: 1.o
69+
70+
; INDEX-BC: ^0 = module: (path: "1.o", hash: (0, 0, 0, 0, 0))
71+
; INDEX-BC-NEXT: ^1 = module: (path: "4.o", hash: (0, 0, 0, 0, 0))
72+
; INDEX-BC-NEXT: ^2 = module: (path: "d/2.o", hash: (0, 0, 0, 0, 0))
73+
74+
;; Ensure LLD generates an empty index for each bitcode file even if all bitcode files are lazy.
75+
; RUN: rm -f 1.o.thinlto.bc
76+
; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown /dev/null -o dummy.o
77+
; RUN: wasm-ld --thinlto-index-only -shared dummy.o --start-lib 1.o --end-lib -o /dev/null
78+
; RUN: ls 1.o.thinlto.bc
79+
80+
;; Ensure when the same bitcode object is given as both lazy and non-lazy,
81+
;; LLD does not generate an empty index for the lazy object.
82+
; RUN: rm -f d/2.o.thinlto.bc
83+
; RUN: wasm-ld --thinlto-index-only -shared 1.o d/2.o --start-lib d/2.o --end-lib -o /dev/null
84+
; RUN: llvm-dis < d/2.o.thinlto.bc | grep -q '\^0 = module:'
85+
; RUN: rm -f d/2.o.thinlto.bc
86+
; RUN: wasm-ld --thinlto-index-only -shared --start-lib d/2.o --end-lib d/2.o 1.o -o /dev/null
87+
; RUN: llvm-dis < d/2.o.thinlto.bc | grep -q '\^0 = module:'
88+
89+
;; Ensure when the same lazy bitcode object is given multiple times,
90+
;; no empty index file is generated if one of the copies is linked.
91+
; RUN: rm -f d/2.o.thinlto.bc
92+
; RUN: wasm-ld --thinlto-index-only -shared 1.o --start-lib d/2.o --end-lib --start-lib d/2.o --end-lib -o /dev/null
93+
; RUN: llvm-dis < d/2.o.thinlto.bc | grep -q '\^0 = module:'
94+
95+
; NM: T f
96+
97+
;; The backend index for this module contains summaries from itself and
98+
;; Inputs/thinlto.ll, as it imports from the latter.
99+
; BACKEND1: <MODULE_STRTAB_BLOCK
100+
; BACKEND1-NEXT: <ENTRY {{.*}} record string = '1.o'
101+
; BACKEND1-NEXT: <ENTRY {{.*}} record string = 'd/2.o'
102+
; BACKEND1-NEXT: </MODULE_STRTAB_BLOCK
103+
; BACKEND1: <GLOBALVAL_SUMMARY_BLOCK
104+
; BACKEND1: <VERSION
105+
; BACKEND1: <FLAGS
106+
; BACKEND1: <VALUE_GUID {{.*}} op0={{1|2}} {{op1=3060885059 op2=1207956914|op1=3432075125 op2=3712786831}}
107+
; BACKEND1: <VALUE_GUID {{.*}} op0={{1|2}} {{op1=3060885059 op2=1207956914|op1=3432075125 op2=3712786831}}
108+
; BACKEND1: <COMBINED
109+
; BACKEND1: <COMBINED
110+
; BACKEND1: </GLOBALVAL_SUMMARY_BLOCK
111+
112+
;; The backend index for Input/thinlto.ll contains summaries from itself only,
113+
;; as it does not import anything.
114+
; BACKEND2: <MODULE_STRTAB_BLOCK
115+
; BACKEND2-NEXT: <ENTRY {{.*}} record string = 'd/2.o'
116+
; BACKEND2-NEXT: </MODULE_STRTAB_BLOCK
117+
; BACKEND2-NEXT: <GLOBALVAL_SUMMARY_BLOCK
118+
; BACKEND2-NEXT: <VERSION
119+
; BACKEND2-NEXT: <FLAGS
120+
; BACKEND2-NEXT: <VALUE_GUID {{.*}} op0=1 op1=3060885059 op2=1207956914
121+
; BACKEND2-NEXT: <COMBINED
122+
; BACKEND2-NEXT: </GLOBALVAL_SUMMARY_BLOCK
123+
124+
; BACKEND3: ^0 = flags:
125+
126+
; BACKEND4: ^0 = module: (path: "4.o", hash: (0, 0, 0, 0, 0))
127+
128+
;--- 0.ll
129+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
130+
target triple = "wasm32-unknown-unknown"
131+
132+
define void @foo() {
133+
ret void
134+
}
135+
136+
;--- 1.ll
137+
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
138+
target triple = "wasm32-unknown-unknown"
139+
140+
declare void @g(...)
141+
142+
define void @f() {
143+
entry:
144+
call void (...) @g()
145+
ret void
146+
}

lld/test/wasm/lto/thinlto.ll

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,56 @@
11
; Basic ThinLTO tests.
2-
; RUN: opt -module-summary %s -o %t1.o
3-
; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
2+
; RUN: rm -rf %t && mkdir %t && cd %t
3+
; RUN: mkdir d e
4+
5+
; RUN: opt -module-summary %s -o a.o
6+
; RUN: opt -module-summary %p/Inputs/thinlto.ll -o d/b.o
47

58
; First force single-threaded mode
6-
; RUN: rm -f %t31.lto.o %t32.lto.o
7-
; RUN: wasm-ld -r -save-temps --thinlto-jobs=1 %t1.o %t2.o -o %t3
8-
; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
9-
; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
9+
; RUN: rm -f out.lto.a.o d/out.lto.b.o
10+
; RUN: wasm-ld -r -save-temps --thinlto-jobs=1 a.o d/b.o -o e/out
11+
; RUN: llvm-nm out.lto.a.o | FileCheck %s --check-prefix=NM1
12+
; RUN: llvm-nm d/out.lto.b.o | FileCheck %s --check-prefix=NM2
1013

1114
; Next force multi-threaded mode
12-
; RUN: rm -f %t31.lto.o %t32.lto.o
13-
; RUN: wasm-ld -r -save-temps --thinlto-jobs=2 %t1.o %t2.o -o %t3
14-
; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
15-
; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
15+
; RUN: rm -f out.lto.a.o d/out.lto.b.o
16+
; RUN: wasm-ld -r -save-temps --thinlto-jobs=2 a.o d/b.o -o e/out
17+
; RUN: llvm-nm out.lto.a.o | FileCheck %s --check-prefix=NM1
18+
; RUN: llvm-nm d/out.lto.b.o | FileCheck %s --check-prefix=NM2
1619

1720
;; --thinlto-jobs= defaults to --threads=.
18-
; RUN: rm -f %t31.lto.o %t32.lto.o
19-
; RUN: wasm-ld -r -save-temps --threads=2 %t1.o %t2.o -o %t3
20-
; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
21-
; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
21+
; RUN: rm -f out.lto.a.o d/out.lto.b.o
22+
; RUN: wasm-ld -r -save-temps --threads=2 a.o d/b.o -o e/out
23+
; RUN: llvm-nm out.lto.a.o | FileCheck %s --check-prefix=NM1
24+
; RUN: llvm-nm d/out.lto.b.o | FileCheck %s --check-prefix=NM2
2225

2326
;; --thinlto-jobs= overrides --threads=.
24-
; RUN: rm -f %t31.lto.o %t32.lto.o
25-
; RUN: wasm-ld -r -save-temps --threads=1 --thinlto-jobs=2 %t1.o %t2.o -o %t3
26-
; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
27-
; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
27+
; RUN: rm -f out.lto.a.o d/out.lto.b.o
28+
; RUN: wasm-ld -r -save-temps --threads=1 --thinlto-jobs=2 a.o d/b.o -o e/out
29+
; RUN: llvm-nm out.lto.a.o | FileCheck %s --check-prefix=NM1
30+
; RUN: llvm-nm d/out.lto.b.o | FileCheck %s --check-prefix=NM2
2831

2932
; Test with all threads, on all cores, on all CPU sockets
30-
; RUN: rm -f %t31.lto.o %t32.lto.o
31-
; RUN: wasm-ld -r -save-temps --thinlto-jobs=all %t1.o %t2.o -o %t3
32-
; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
33-
; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
33+
; RUN: rm -f out.lto.a.o d/out.lto.b.o
34+
; RUN: wasm-ld -r -save-temps --thinlto-jobs=all a.o d/b.o -o e/out
35+
; RUN: llvm-nm out.lto.a.o | FileCheck %s --check-prefix=NM1
36+
; RUN: llvm-nm d/out.lto.b.o | FileCheck %s --check-prefix=NM2
3437

3538
; Test with many more threads than the system has
36-
; RUN: rm -f %t31.lto.o %t32.lto.o
37-
; RUN: wasm-ld -r -save-temps --thinlto-jobs=100 %t1.o %t2.o -o %t3
38-
; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
39-
; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
39+
; RUN: rm -f out.lto.a.o d/out.lto.b.o
40+
; RUN: wasm-ld -r -save-temps --thinlto-jobs=100 a.o d/b.o -o e/out
41+
; RUN: llvm-nm out.lto.a.o | FileCheck %s --check-prefix=NM1
42+
; RUN: llvm-nm d/out.lto.b.o | FileCheck %s --check-prefix=NM2
4043

4144
; Test with a bad value
42-
; RUN: rm -f %t31.lto.o %t32.lto.o
43-
; RUN: not wasm-ld -r -save-temps --thinlto-jobs=foo %t1.o %t2.o -o %t3 2>&1 | FileCheck %s --check-prefix=BAD-JOBS
45+
; RUN: rm -f out.lto.a.o d/out.lto.b.o
46+
; RUN: not wasm-ld -r -save-temps --thinlto-jobs=foo a.o d/b.o -o e/out 2>&1 | FileCheck %s --check-prefix=BAD-JOBS
4447
; BAD-JOBS: error: --thinlto-jobs: invalid job count: foo
4548

4649
; Check without --thinlto-jobs (which currently defaults to heavyweight_hardware_concurrency, meanning one thread per hardware core -- not SMT)
47-
; RUN: rm -f %t31.lto.o %t32.lto.o
48-
; RUN: wasm-ld -r -save-temps %t1.o %t2.o -o %t3
49-
; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
50-
; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
50+
; RUN: rm -f out.lto.a.o d/out.lto.b.o
51+
; RUN: wasm-ld -r -save-temps a.o d/b.o -o e/out
52+
; RUN: llvm-nm out.lto.a.o | FileCheck %s --check-prefix=NM1
53+
; RUN: llvm-nm d/out.lto.b.o | FileCheck %s --check-prefix=NM2
5154

5255
; NM1: T f
5356
; NM2: T g

lld/wasm/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ add_lld_library(lldWasm
2121
LINK_COMPONENTS
2222
${LLVM_TARGETS_TO_BUILD}
2323
BinaryFormat
24+
BitWriter
2425
Core
2526
Demangle
2627
LTO

lld/wasm/Config.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ struct Configuration {
7979
// Because dyamanic linking under Wasm is still experimental we default to
8080
// static linking
8181
bool isStatic = true;
82+
bool thinLTOEmitImportsFiles;
83+
bool thinLTOEmitIndexFiles;
84+
bool thinLTOIndexOnly;
8285
bool trace;
8386
uint64_t globalBase;
8487
uint64_t initialHeap;
@@ -95,16 +98,18 @@ struct Configuration {
9598
unsigned ltoo;
9699
llvm::CodeGenOptLevel ltoCgo;
97100
unsigned optimize;
98-
llvm::StringRef thinLTOJobs;
99101
bool ltoDebugPassManager;
100102
UnresolvedPolicy unresolvedSymbols;
101103
BuildIdKind buildId = BuildIdKind::None;
102104

103105
llvm::StringRef entry;
106+
llvm::StringRef ltoObjPath;
104107
llvm::StringRef mapFile;
105108
llvm::StringRef outputFile;
106109
llvm::StringRef soName;
107110
llvm::StringRef thinLTOCacheDir;
111+
llvm::StringRef thinLTOJobs;
112+
llvm::StringRef thinLTOIndexOnlyArg;
108113
llvm::StringRef whyExtract;
109114

110115
llvm::StringSet<> allowUndefinedSymbols;
@@ -126,6 +131,7 @@ struct Ctx {
126131
llvm::SmallVector<StubFile *, 0> stubFiles;
127132
llvm::SmallVector<SharedFile *, 0> sharedFiles;
128133
llvm::SmallVector<BitcodeFile *, 0> bitcodeFiles;
134+
llvm::SmallVector<BitcodeFile *, 0> lazyBitcodeFiles;
129135
llvm::SmallVector<InputFunction *, 0> syntheticFunctions;
130136
llvm::SmallVector<InputGlobal *, 0> syntheticGlobals;
131137
llvm::SmallVector<InputTable *, 0> syntheticTables;

0 commit comments

Comments
 (0)