1 # Copyright 2019 Dmitry Arkhipov
2 # Distributed under the Boost Software License, Version 1.0.
3 # (See accompanying file LICENSE.txt or copy at
4 # https://www.bfgroup.xyz/b2/LICENSE.txt)
10 [[bbv2.builtin.features.lto]]`lto`::
11 *Allowed values:* `on`.
13 Enables link time optimizations (also known as interprocedural optimizations or
14 whole-program optimizations). Currently supported toolsets are <<GNU {CPP}>>,
15 clang and <<Microsoft Visual {CPP}>>. The feature is optional.
21 : optional propagated ;
25 [[bbv2.builtin.features.lto-mode]]`lto-mode`::
28 *Allowed values:* `full`, `thin`, `fat`.
30 Specifies the type of LTO to use.
32 `full`::: Use the monolithic LTO: on linking all input is merged into a single
34 `thin`::: Use clang's ThinLTO: each compiled file contains a summary of the
35 module, these summaries are merged into a single index. This allows to avoid
36 merging all modules together, which greatly reduces linking time.
37 `fat`::: Produce gcc's fat LTO objects: compiled files contain both the
38 intermidiate language suitable for LTO and object code suitable for regular
43 feature.subfeature lto