]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/features/lto-feature.jam
359c2f99b025ad8cb6f6f9f6cde5858caf336196
[ceph.git] / ceph / src / boost / tools / build / src / tools / features / lto-feature.jam
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)
5
6 import feature ;
7
8 #| tag::doc[]
9
10 [[bbv2.builtin.features.lto]]`lto`::
11 *Allowed values:* `on`.
12 +
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.
16
17 |# # end::doc[]
18
19 feature.feature lto
20 : on
21 : optional propagated ;
22
23 #| tag::doc[]
24
25 [[bbv2.builtin.features.lto-mode]]`lto-mode`::
26 *Subfeature of* `lto`
27 +
28 *Allowed values:* `full`, `thin`, `fat`.
29 +
30 Specifies the type of LTO to use.
31 +
32 `full`::: Use the monolithic LTO: on linking all input is merged into a single
33 module.
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
39 linking.
40
41 |# # end::doc[]
42
43 feature.subfeature lto
44 : mode
45 : full thin fat
46 : propagated ;