From 0b34dd3577758b2be42c02a3f6f8ec621cfdd917 Mon Sep 17 00:00:00 2001 From: Samuel Moelius <35515885+smoelius@users.noreply.github.com> Date: Fri, 15 Aug 2025 13:08:25 -0400 Subject: [PATCH 1/2] Reorder `lto` options in profiles.md --- src/doc/src/reference/profiles.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/src/reference/profiles.md b/src/doc/src/reference/profiles.md index 448543a5cee..28dd841fd16 100644 --- a/src/doc/src/reference/profiles.md +++ b/src/doc/src/reference/profiles.md @@ -168,14 +168,14 @@ of longer linking time. The valid options are: -* `false`: Performs "thin local LTO" which performs "thin" LTO on the local - crate only across its [codegen units](#codegen-units). No LTO is performed - if codegen units is 1 or [opt-level](#opt-level) is 0. * `true` or `"fat"`: Performs "fat" LTO which attempts to perform optimizations across all crates within the dependency graph. * `"thin"`: Performs ["thin" LTO]. This is similar to "fat", but takes substantially less time to run while still achieving performance gains similar to "fat". +* `false`: Performs "thin local LTO" which performs "thin" LTO on the local + crate only across its [codegen units](#codegen-units). No LTO is performed + if codegen units is 1 or [opt-level](#opt-level) is 0. * `"off"`: Disables LTO. See the [linker-plugin-lto chapter] if you are interested in cross-language LTO. From 396f8c62ed0242442d5004ffe605dfea9d5f9907 Mon Sep 17 00:00:00 2001 From: Samuel Moelius <35515885+smoelius@users.noreply.github.com> Date: Sun, 17 Aug 2025 10:29:42 -0400 Subject: [PATCH 2/2] Mention ordering rationale in profiles.md Co-authored-by: Weihang Lo --- src/doc/src/reference/profiles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/reference/profiles.md b/src/doc/src/reference/profiles.md index 28dd841fd16..21d44135bf5 100644 --- a/src/doc/src/reference/profiles.md +++ b/src/doc/src/reference/profiles.md @@ -166,7 +166,7 @@ The `lto` setting controls `rustc`'s [`-C lto`], [`-C linker-plugin-lto`], and LTO can produce better optimized code, using whole-program analysis, at the cost of longer linking time. -The valid options are: +The valid options from most to least optimizing are: * `true` or `"fat"`: Performs "fat" LTO which attempts to perform optimizations across all crates within the dependency graph.