pub enum Lto {
Run(Option<InternedString>),
Off,
OnlyBitcode,
ObjectAndBitcode,
OnlyObject,
}
Expand description
Possible ways to run rustc and request various parts of LTO.
Variant | Flag | Object Code | Bitcode |
---|---|---|---|
Run | -C lto=foo | n/a | n/a |
Off | -C lto=off | n/a | n/a |
OnlyBitcode | -C linker-plugin-lto | ✓ | |
ObjectAndBitcode | ✓ | ✓ | |
OnlyObject | -C embed-bitcode=no | ✓ |
Variants§
Run(Option<InternedString>)
LTO is run for this rustc, and it’s -Clto=foo
. If the given value is
None, that corresponds to -Clto
with no argument, which means do
“fat” LTO.
Off
LTO has been explicitly listed as “off”. This means no thin-local-LTO, no LTO anywhere, I really mean it!
OnlyBitcode
This rustc invocation only needs to produce bitcode (it is only used
for LTO), there’s no need to produce object files, so we can pass
-Clinker-plugin-lto
ObjectAndBitcode
This rustc invocation needs to embed bitcode in object files. This means that object files may be used for a normal link, and the crate may be loaded for LTO later, so both are required.
OnlyObject
This should not include bitcode. This is primarily to reduce disk space usage.
Trait Implementations§
impl Copy for Lto
impl Eq for Lto
impl StructuralPartialEq for Lto
Auto Trait Implementations§
impl Freeze for Lto
impl RefUnwindSafe for Lto
impl Send for Lto
impl Sync for Lto
impl Unpin for Lto
impl UnwindSafe for Lto
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Run
: 16 bytesOff
: 0 bytesOnlyBitcode
: 0 bytesObjectAndBitcode
: 0 bytesOnlyObject
: 0 bytes