From 98901bbf2c6e26fe276fc8bd0ba241b2d56f9a5c Mon Sep 17 00:00:00 2001 From: ethan-000 Date: Sat, 11 Feb 2023 10:11:33 +0000 Subject: [PATCH] add comment to lto.rs --- src/cargo/core/compiler/lto.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cargo/core/compiler/lto.rs b/src/cargo/core/compiler/lto.rs index 661d1d266e19..f50b16f895ee 100644 --- a/src/cargo/core/compiler/lto.rs +++ b/src/cargo/core/compiler/lto.rs @@ -5,6 +5,7 @@ use crate::util::interning::InternedString; use crate::util::errors::CargoResult; use std::collections::hash_map::{Entry, HashMap}; +/// LTO: Link Time Optimizations /// Possible ways to run rustc and request various parts of LTO. /// /// Variant | Flag | Object Code | Bitcode @@ -14,6 +15,8 @@ use std::collections::hash_map::{Entry, HashMap}; /// `OnlyBitcode` | `-C linker-plugin-lto` | | ✓ /// `ObjectAndBitcode` | | ✓ | ✓ /// `OnlyObject` | `-C embed-bitcode=no` | ✓ | +/// +/// See https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#lto #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Lto { /// LTO is run for this rustc, and it's `-Clto=foo`. If the given value is