Skip to content

Commit 530b02f

Browse files
authored
Rollup merge of #84365 - vext01:improve-lto-docstrings, r=petrochenkov
Improve the docstrings of the `Lto` struct. This change is the result of [this zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Making.20sense.20of.20LTO.20modes.20in.20rustc). Hopefully it makes things a little clearer. What do you think?
2 parents 09135f6 + 8cc918a commit 530b02f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Diff for: compiler/rustc_session/src/config.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,21 @@ impl_stable_hash_via_hash!(OptLevel);
7575

7676
/// This is what the `LtoCli` values get mapped to after resolving defaults and
7777
/// and taking other command line options into account.
78+
///
79+
/// Note that linker plugin-based LTO is a different mechanism entirely.
7880
#[derive(Clone, PartialEq)]
7981
pub enum Lto {
80-
/// Don't do any LTO whatsoever
82+
/// Don't do any LTO whatsoever.
8183
No,
8284

83-
/// Do a full crate graph LTO with ThinLTO
85+
/// Do a full-crate-graph (inter-crate) LTO with ThinLTO.
8486
Thin,
8587

86-
/// Do a local graph LTO with ThinLTO (only relevant for multiple codegen
87-
/// units).
88+
/// Do a local ThinLTO (intra-crate, over the CodeGen Units of the local crate only). This is
89+
/// only relevant if multiple CGUs are used.
8890
ThinLocal,
8991

90-
/// Do a full crate graph LTO with "fat" LTO
92+
/// Do a full-crate-graph (inter-crate) LTO with "fat" LTO.
9193
Fat,
9294
}
9395

0 commit comments

Comments
 (0)