1700637cbSDimitry AndricIntegrated Distributed ThinLTO (DTLTO) 2700637cbSDimitry Andric====================================== 3700637cbSDimitry Andric 4700637cbSDimitry AndricIntegrated Distributed ThinLTO (DTLTO) enables the distribution of backend 5700637cbSDimitry AndricThinLTO compilations via external distribution systems, such as Incredibuild, 6700637cbSDimitry Andricduring the traditional link step. 7700637cbSDimitry Andric 8700637cbSDimitry AndricThe implementation is documented here: https://llvm.org/docs/DTLTO.html. 9700637cbSDimitry Andric 10*e64bea71SDimitry AndricCurrently, DTLTO is only supported in ELF and COFF LLD. 11700637cbSDimitry Andric 12700637cbSDimitry AndricELF LLD 13700637cbSDimitry Andric------- 14700637cbSDimitry Andric 15700637cbSDimitry AndricThe command-line interface is as follows: 16700637cbSDimitry Andric 17700637cbSDimitry Andric- ``--thinlto-distributor=<path>`` 18700637cbSDimitry Andric Specifies the file to execute as the distributor process. If specified, 19700637cbSDimitry Andric ThinLTO backend compilations will be distributed. 20700637cbSDimitry Andric 21700637cbSDimitry Andric- ``--thinlto-remote-compiler=<path>`` 22700637cbSDimitry Andric Specifies the path to the compiler that the distributor process will use for 23700637cbSDimitry Andric backend compilations. The compiler invoked must match the version of LLD. 24700637cbSDimitry Andric 25700637cbSDimitry Andric- ``--thinlto-distributor-arg=<arg>`` 26700637cbSDimitry Andric Specifies ``<arg>`` on the command line when invoking the distributor. 27700637cbSDimitry Andric Can be specified multiple times. 28700637cbSDimitry Andric 29700637cbSDimitry Andric- ``--thinlto-remote-compiler-arg=<arg>`` 30700637cbSDimitry Andric Appends ``<arg>`` to the remote compiler's command line. 31700637cbSDimitry Andric Can be specified multiple times. 32700637cbSDimitry Andric 33700637cbSDimitry Andric Options that introduce extra input/output files may cause miscompilation if 34700637cbSDimitry Andric the distribution system does not automatically handle pushing/fetching them to 35700637cbSDimitry Andric remote nodes. In such cases, configure the distributor - possibly using 36700637cbSDimitry Andric ``--thinlto-distributor-arg=`` - to manage these dependencies. See the 37700637cbSDimitry Andric distributor documentation for details. 38700637cbSDimitry Andric 39700637cbSDimitry AndricSome LLD LTO options (e.g., ``--lto-sample-profile=<file>``) are supported. 40700637cbSDimitry AndricCurrently, other options are silently accepted but do not have the intended 41700637cbSDimitry Andriceffect. Support for such options will be expanded in the future. 42*e64bea71SDimitry Andric 43*e64bea71SDimitry AndricCOFF LLD 44*e64bea71SDimitry Andric-------- 45*e64bea71SDimitry Andric 46*e64bea71SDimitry AndricThe command-line interface is as follows: 47*e64bea71SDimitry Andric 48*e64bea71SDimitry Andric- ``/thinlto-distributor:<path>`` 49*e64bea71SDimitry Andric Specifies the file to execute as the distributor process. If specified, 50*e64bea71SDimitry Andric ThinLTO backend compilations will be distributed. 51*e64bea71SDimitry Andric 52*e64bea71SDimitry Andric- ``/thinlto-remote-compiler:<path>`` 53*e64bea71SDimitry Andric Specifies the path to the compiler that the distributor process will use for 54*e64bea71SDimitry Andric backend compilations. The compiler invoked must match the version of LLD. 55*e64bea71SDimitry Andric 56*e64bea71SDimitry Andric- ``/thinlto-distributor-arg:<arg>`` 57*e64bea71SDimitry Andric Specifies ``<arg>`` on the command line when invoking the distributor. 58*e64bea71SDimitry Andric Can be specified multiple times. 59*e64bea71SDimitry Andric 60*e64bea71SDimitry Andric- ``/thinlto-remote-compiler-arg:<arg>`` 61*e64bea71SDimitry Andric Appends ``<arg>`` to the remote compiler's command line. 62*e64bea71SDimitry Andric Can be specified multiple times. 63*e64bea71SDimitry Andric 64*e64bea71SDimitry Andric Options that introduce extra input/output files may cause miscompilation if 65*e64bea71SDimitry Andric the distribution system does not automatically handle pushing/fetching them to 66*e64bea71SDimitry Andric remote nodes. In such cases, configure the distributor - possibly using 67*e64bea71SDimitry Andric ``/thinlto-distributor-arg:`` - to manage these dependencies. See the 68*e64bea71SDimitry Andric distributor documentation for details. 69*e64bea71SDimitry Andric 70*e64bea71SDimitry AndricSome LLD LTO options (e.g., ``/lto-sample-profile:<file>``) are supported. 71*e64bea71SDimitry AndricCurrently, other options are silently accepted but do not have the intended 72*e64bea71SDimitry Andriceffect. Support for such options could be expanded in the future. 73*e64bea71SDimitry Andric 74*e64bea71SDimitry AndricCurrently, there is no DTLTO command line interface supplied for ``clang-cl``, 75*e64bea71SDimitry Andricas users are expected to invoke LLD directly.