Skip to content

Commit eae8d0d

Browse files
authored
Reorder lto options in profiles.md (#15841)
Aside from `false`, the `lto` options seem to be ordered from "most optimizing" to "least optimizing". If this interpretation is correct, then I think `false` should go between `thin` and `off`. cc: @ehuss (who I think wrote that text)
2 parents e04e0b6 + 396f8c6 commit eae8d0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/doc/src/reference/profiles.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,16 +166,16 @@ The `lto` setting controls `rustc`'s [`-C lto`], [`-C linker-plugin-lto`], and
166166
LTO can produce better optimized code, using whole-program analysis, at the cost
167167
of longer linking time.
168168

169-
The valid options are:
169+
The valid options from most to least optimizing are:
170170

171-
* `false`: Performs "thin local LTO" which performs "thin" LTO on the local
172-
crate only across its [codegen units](#codegen-units). No LTO is performed
173-
if codegen units is 1 or [opt-level](#opt-level) is 0.
174171
* `true` or `"fat"`: Performs "fat" LTO which attempts to perform
175172
optimizations across all crates within the dependency graph.
176173
* `"thin"`: Performs ["thin" LTO]. This is similar to "fat", but takes
177174
substantially less time to run while still achieving performance gains
178175
similar to "fat".
176+
* `false`: Performs "thin local LTO" which performs "thin" LTO on the local
177+
crate only across its [codegen units](#codegen-units). No LTO is performed
178+
if codegen units is 1 or [opt-level](#opt-level) is 0.
179179
* `"off"`: Disables LTO.
180180

181181
See the [linker-plugin-lto chapter] if you are interested in cross-language LTO.

0 commit comments

Comments
 (0)