mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
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)
This commit is contained in:
commit
eae8d0dd30
@ -166,16 +166,16 @@ 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
|
LTO can produce better optimized code, using whole-program analysis, at the cost
|
||||||
of longer linking time.
|
of longer linking time.
|
||||||
|
|
||||||
The valid options are:
|
The valid options from most to least optimizing 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
|
* `true` or `"fat"`: Performs "fat" LTO which attempts to perform
|
||||||
optimizations across all crates within the dependency graph.
|
optimizations across all crates within the dependency graph.
|
||||||
* `"thin"`: Performs ["thin" LTO]. This is similar to "fat", but takes
|
* `"thin"`: Performs ["thin" LTO]. This is similar to "fat", but takes
|
||||||
substantially less time to run while still achieving performance gains
|
substantially less time to run while still achieving performance gains
|
||||||
similar to "fat".
|
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.
|
* `"off"`: Disables LTO.
|
||||||
|
|
||||||
See the [linker-plugin-lto chapter] if you are interested in cross-language LTO.
|
See the [linker-plugin-lto chapter] if you are interested in cross-language LTO.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user