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 StructuralEq for Lto
impl StructuralPartialEq for Lto
Auto Trait Implementations
impl RefUnwindSafe for Lto
impl Send for Lto
impl Sync for Lto
impl Unpin for Lto
impl UnwindSafe for Lto
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more