|
24 | 24 | Using the *separate thin-link* approach requires a build system capable of |
25 | 25 | handling the dynamic dependencies specified in the individual summary index |
26 | 26 | files, such as Bazel. DTLTO removes this requirement, allowing it to be used |
27 | | -with any build process that supports in-process ThinLTO. |
| 27 | +with any build process that supports in-process ThinLTO. To facilitate this, |
| 28 | +DTLTO supports common in-process ThinLTO features, such as caching. Bitcode |
| 29 | +objects in static libraries/archives (e.g. libc.a) are also handled |
| 30 | +transparently by temporarily extracting referenced objects for distribution; |
| 31 | +when thin archives are used, no extraction is required. |
28 | 32 |
|
29 | 33 | The following commands show the steps used for the *separate thin-link* |
30 | 34 | approach for a basic example: |
@@ -66,7 +70,7 @@ such as the following can be used: |
66 | 70 |
|
67 | 71 | .. code-block:: console |
68 | 72 |
|
69 | | - clang -flto=thin -fuse-ld=lld -O2 t1.o t2.o -fthinlto-distributor=$(which python3) \ |
| 73 | + clang -flto=thin -fuse-ld=lld -O2 t1.o t2.o libt3.a -fthinlto-distributor=$(which python3) \ |
70 | 74 | -Xthinlto-distributor=$LLVMSRC/llvm/utils/dtlto/local.py |
71 | 75 |
|
72 | 76 | Distributors |
@@ -165,22 +169,22 @@ following backend compilation commands with maximum parallelism: |
165 | 169 | /usr/bin/clang -O2 -c -fprofile-sample-use=my.prof t2.o -fthinlto-index=t2.o.thinlto.bc -o t2.native.o \ |
166 | 170 | -fproc-stat-report=t2.stats.txt |
167 | 171 |
|
168 | | -TODOs |
169 | | ------ |
| 172 | +Limitations |
| 173 | +----------- |
170 | 174 |
|
171 | | -The following features are planned for DTLTO but not yet implemented: |
| 175 | +The following features are not implemented at this time: |
172 | 176 |
|
173 | | -- Support for the ThinLTO in-process cache. |
174 | 177 | - Support for platforms other than ELF and COFF. |
175 | | -- Support for archives with bitcode members. |
176 | | -- Support for more LTO configurations; only a very limited set of LTO |
177 | | - configurations is supported currently, e.g., support for basic block sections |
178 | | - is not currently available. |
| 178 | +- Support for more CodeGen configurations in the LTO backend; only a very |
| 179 | + limited set is supported currently, e.g. support for basic block sections is |
| 180 | + not currently available. |
| 181 | +- Support for sharing ThinLTO cache entries with in-process ThinLTO entries. |
| 182 | + This is not currently supported because identical code generation is not yet |
| 183 | + guaranteed. |
179 | 184 |
|
180 | 185 | Constraints |
181 | 186 | ----------- |
182 | 187 |
|
183 | 188 | - Matching versions of Clang and LLD should be used. |
184 | 189 | - The distributor used must support the JSON schema generated by the version of |
185 | 190 | LLD in use. |
186 | | - |
|
0 commit comments