|
| 1 | +Integrated Distributed ThinLTO (DTLTO) |
| 2 | +====================================== |
| 3 | + |
| 4 | +Integrated Distributed ThinLTO (DTLTO) enables the distribution of backend |
| 5 | +ThinLTO compilations via external distribution systems, such as Incredibuild, |
| 6 | +during the traditional link step. |
| 7 | + |
| 8 | +The implementation is documented here: https://llvm.org/docs/DTLTO.html. |
| 9 | + |
| 10 | +Currently, DTLTO is only supported in ELF LLD. Support will be added to other |
| 11 | +LLD flavours in the future. |
| 12 | + |
| 13 | +ELF LLD |
| 14 | +------- |
| 15 | + |
| 16 | +The command-line interface is as follows: |
| 17 | + |
| 18 | +- ``--thinlto-distributor=<path>`` |
| 19 | + Specifies the file to execute as the distributor process. If specified, |
| 20 | + ThinLTO backend compilations will be distributed. |
| 21 | + |
| 22 | +- ``--thinlto-remote-compiler=<path>`` |
| 23 | + Specifies the path to the compiler that the distributor process will use for |
| 24 | + backend compilations. The compiler invoked must match the version of LLD. |
| 25 | + |
| 26 | +- ``--thinlto-distributor-arg=<arg>`` |
| 27 | + Specifies ``<arg>`` on the command line when invoking the distributor. |
| 28 | + Can be specified multiple times. |
| 29 | + |
| 30 | +- ``--thinlto-remote-compiler-arg=<arg>`` |
| 31 | + Appends ``<arg>`` to the remote compiler's command line. |
| 32 | + Can be specified multiple times. |
| 33 | + |
| 34 | + Options that introduce extra input/output files may cause miscompilation if |
| 35 | + the distribution system does not automatically handle pushing/fetching them to |
| 36 | + remote nodes. In such cases, configure the distributor - possibly using |
| 37 | + ``--thinlto-distributor-arg=`` - to manage these dependencies. See the |
| 38 | + distributor documentation for details. |
| 39 | + |
| 40 | +Some LLD LTO options (e.g., ``--lto-sample-profile=<file>``) are supported. |
| 41 | +Currently, other options are silently accepted but do not have the intended |
| 42 | +effect. Support for such options will be expanded in the future. |
0 commit comments